We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45613
    • 45 Posts
    I am having problems with a package I created with BobRay's MyComponent extra.

    I am getting the errors
    Could not find Template and/or TV Bootstrap.inner - Tv2
    Could not find Template and/or TV Bootstrap.inner - Tv1

    I have looked all over and none of the resources reference the "Bootstrap.inner" template.
    I have searched all the files in /assets/mycomponents/myproject and only found 1 reference to this.
    It is in the tv.resolver.php which is built by MC. It is putting entries in the "intersects" array.

    Why is it including this? Everytime I rebuild this file, it puts this in.

    thanks,
    bill

      • 3749
      • 24,544 Posts
      Did you run both Bootstrap and Export Objects before running Build?

      Do you have a template called Bootstrap.inner on the site (there's nothing with that name in MyComponent). If so, is it maybe in the same category as your project?

      What's the content of the 'templateVars' array in your project config file (the one in core/components/mycomponents/_build/config). Paste it here inside of code tags.

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 45613
        • 45 Posts
        Thanks for the quick reply....

        Did you run both Bootstrap and Export Objects before running Build?
        Yes, multiple times, cleared cache, deleted resolver files.

        Do you have a template called Bootstrap.inner on the site (there's nothing with that name in MyComponent). If so, is it maybe in the same category as your project?
        on the dev site where MC is installed and run, there is a template called Bootstrap.inner. It is in the Theme.Bootstrap category along with Bootstrap.main (which is not picked up by MC).

        What's the content of the 'templateVars' array in your project config file (the one in core/components/mycomponents/_build/config). Paste it here inside of code tags.
         'templates' => array(
                    'Template1' => array(
                        'category' => 'bwsteams',
                    ),
                    'Template2' => array(
                        'category' => 'bwsteams',
                        'description' => 'Description for Template two',
                        'static' => false,
                        'propertySets' => array(
                            'PropertySet2',
                        ),
                    ),
                ),
                'templateVars' => array(
                    'Tv1' => array(
                        'category' => 'bwsteams',
                        'description' => 'Description for TV one',
                        'caption' => 'TV One',
                        'default_text' => 'Tv1 Default Text',
                        'propertySets' => array(
                            'PropertySet1',
                            'PropertySet2',
                        ),
                        'templates' => array(
                            'default' => 1,
                            'Template1' => 4,
                            'Template2' => 4,
        
        
                        ),
                    ),
                    'Tv2' => array( /* bwsteams with templates, default, and static specified */
                        'category' => 'bwsteams',
                        'description' => 'Description for TV two',
                        'caption' => 'TV Two',
                        'static' => false,
                        'default_text' => '@INHERIT',
                        'templates' => array(
                            'default' => 3, /* second value is rank -- for ordering TVs when editing resource */
                            'Template1' => 4,
                            'Template2' => 1,
                        ),
                    ),
                ),



        The only thing that I just thought of, but have not tested is that Bootstrap.inner is set in the system settings as the default_template. Could MC be picking that up?

        Thanks,
        bill
          • 45613
          • 45 Posts
          I set the site default_template back to base template. That did not make a difference.
          I cleared cache, ran bootstrap, export objects, and build. Still got the error.

          This is part of the tv.resolver.php file that included Bootstrap.inner, and causes the error.
           switch ($options[xPDOTransport::PACKAGE_ACTION]) {
                  case xPDOTransport::ACTION_INSTALL:
                  case xPDOTransport::ACTION_UPGRADE:
          
                      $intersects = array (
                          0 =>  array (
                            'templateid' => 'Bootstrap.inner',
                            'tmplvarid' => 'Tv2',
                            'rank' => 3,
                          ),
                          1 =>  array (
                            'templateid' => 'default',
                            'tmplvarid' => 'Tv2',
                            'rank' => 3,
                          ),
                          2 =>  array (
                            'templateid' => 'Template1',
                            'tmplvarid' => 'Tv2',
                            'rank' => 4,
                          ),
                          3 =>  array (
                            'templateid' => 'Template2',
                            'tmplvarid' => 'Tv2',
                            'rank' => 1,
                          ),
                          4 =>  array (
                            'templateid' => 'Bootstrap.inner',
                            'tmplvarid' => 'Tv1',
                            'rank' => 1,
                          ),
                          5 =>  array (
                            'templateid' => 'default',
                            'tmplvarid' => 'Tv1',
                            'rank' => 1,
                          ),
                          6 =>  array (
                            'templateid' => 'Template1',
                            'tmplvarid' => 'Tv1',
                            'rank' => 4,
                          ),
                          7 =>  array (
                            'templateid' => 'Template2',
                            'tmplvarid' => 'Tv1',
                            'rank' => 4,
                          ),
                      );
            • 3749
            • 24,544 Posts
            I think the problem is that Tv1 and Tv2 are both connected to the bootstrap.inner template, but that template isn't included in the package. If bootstrap.inner were the site's default template, it probably would work and those TVs would be connected to whatever is the default template on the installation site.

            Since it's not MC expects that template to be included in the package.

            Either add that template to the package, or disconnect both TVs from it and clear the cache. ExportObjects should write a new resolver without those entries.

              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 45613
              • 45 Posts
              Thanks BobRay, that was it. I did not notice that in Template Access for those TVs that the Bootstrap.inner template was checked. This is what exportobjects was finding and why this was an issue.

              Thanks again!
              Bill
                • 3749
                • 24,544 Posts
                I'm glad you got it sorted. Thanks for reporting back. smiley
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting