Forums  ›  Cheetah  ›  Support
 

Template Key Shown On Page

Only thing weird i see is this.

function showBuildZone() {

        return $GLOBALS['oAdmTemplate']->parseHtmlByName('pbuilder_content.html', array(

            'selector' => $this->getPageSelector(),

            'ch_if:page' => array(

As you can see there, the selector key is being passed to the parseHtmlByName function, but the template it is parsing here is pbuilder_content.html. Not the designbox_top_controls.html

So there must be some other code somewhere that passes data to that template.

 

This same module on a Dolphin site doesn't have this issue.  I wonder what could be different about Cheetah that causes that template key to show up on the profile comments box.  

Code:

function showBuildZone() {

        return $GLOBALS['oAdmTemplate']->parseHtmlByName('pbuilder_content.html', array(

            'selector' => $this->getPageSelector(),

            'ch_if:page' => array(

                'condition' => (bool)$this -> oPage,

                'content' => array(

                    'ch_if:view_link' => array(

                        'condition' => !$this->oPage->isSystem,

                        'content' => array(

                            'site_url' => $GLOBALS['site']['url'],

                            'page_name' => htmlspecialchars($this->oPage->sName)

                        ),

),

                    'ch_if:delete_link' => array(

'condition' => false,

                    ),

                    'parser_url' => CH_WSB_URL_ROOT . $this -> _oMain ->_oConfig->getBaseUri() . 'administration/page',

                    'page_name' => addslashes($this->oPage->sName),

                    'page_width_min' => getParam('sys_template_page_width_min'),

                    'page_width_max' => getParam('sys_template_page_width_max'),

                    'page_width' => $this->oPage->iPageWidth,

                    'main_width' => getParam('main_div_width')

                )

            ),

'ch_if:empty' => array(

'condition' => false,

            ),

'ch_if:editor' => array(

'condition' => false,

            ),

        ));

}

 

function getPageSelector() {

         return $this -> _oMain -> parseHtmlByName('pbuilder_cpanel', array(

            'url' => CH_WSB_URL_ROOT . $this -> _oMain ->_oConfig->getBaseUri() . 'apply'

        ));

}

}

 

and in /module/module-name/templates/base/designbox_top_controls.html

<div class="top_settings_block">

    <div class="tsb_cnt_out ch-def-btc-margin-out">

        <div class="tsb_cnt_in ch-def-btc-padding-in">

            __top_controls__

__selector__

        </div>

    </div>

</div>

 

Yes, I found the issue.  It is in a third party module.   I am not sure what __selector__ is doing, I will look at the third party module to find out.  The module is overriding the designbox_top_controls.html.  It probably isn't suppose to be showing up in profile comments but the module was written for Dolphin and not Cheetah.  It is one of those things as we try to move forward.  It is getting late so I will find time tomorrow to work on this.

what i find weird, is in the photo you have shown, the Per Page drop down appears to be missing, but instead see a template key of __selector__

But in the template file of cmts_top_controls.html the template key that is suppose to be there for that is __pages__ which is why i thought the template was altered because __selector__ is the wrong key name for that part of the top control.

 

You may need to download a copy of the entire site so you can do a search through every file for __selector__

 Yes, that is what I need to do.  I think I will archive the site, download the archive, extract, and then see if I can find it.  So far other searches are not turning up anything.

You may need to download a copy of the entire site so you can do a search through every file for __selector__

I search the site for cmts_main and cmts_top_controls and the only files are the ones in /templates/base.  This is strange; where is that template key coming from; unless it only looks like a template key.

It is not in the EVO or the Base template.  I will try searching the modules that I have added to the site and see what turns up.  Oh, I bet it is located in the module's template that is overriding the base template.  I forget that sometimes.

The site is using the EVO template and I don't recall making any changes to the template when I installed some third party modules.  I will check though.  Can a module inject that into the profile comments block without the template being changed?

Look in the template templates\base\cmts_main.html and templates\base\cmts_top_controls.html

Also check those template files if they exist in any custom template being used. If that key is not there, then do a search through all the files for it.

Note: Cheetah does not have a template key named __selector__ so it must have been added to a template, or perhaps a third party module that is no longer installed needed it.

But a search is most likely going to be needed to find the exact template it appears in.

In the profile comments block I am seeing a template key displayed.  What could be causing this?  Need advice on tracking down the cause.  I don't see this here on Cheetah.  I also have another Cheetah based site and the profile comment block is showing correctly.  So it has to be something with the site itself.

 

comments.png63.8K22 views
Forums  ›  Cheetah  ›  Support