Page 1 of 1

Page specific logic not working (1.11.1) [solved]

Posted: Mon Aug 20, 2012 9:47 pm
by reto
Hi all,

Sorry if this issue was raised before, I couldn't find anything related.

Having

Code: Select all

{assign var='test' value='test'}
in the field "Smarty data or logic that is specific to this page:" in the options tab of a page and then, in the template call {$test} would output "test" on my 1.10.3 install, but does nothing on my upgraded install from 1.10.3 to 1.11.1 .

Any Ideas what I could have set wrong?

----------------------------------------------

Cms Version: 1.11.1

Installed Modules:

CMSMailer: 5.2.1
FileManager: 1.4.0
MenuManager: 1.8.3
ModuleManager: 1.5.5
News: 2.12.8
Printing: 1.1.2
Search: 1.7.7
ThemeManager: 1.1.7
TinyMCE: 2.9.11
FormBuilder: 0.7.3
Captcha: 0.4.5
CGExtensions: 1.30
CGSimpleSmarty: 1.5.2
CGFeedMaker: 1.0.16
CGGoogleMaps: 2.3.1
CMSPrinting: 1.0.3
MicroTiny: 1.2.3

Config Information:

php_memory_limit:
process_whole_template:
output_compression: false
max_upload_size: 20000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale: de_DE.UTF-8
default_encoding: utf-8
admin_encoding: utf-8
set_names: true

Php Information:

phpversion: 5.3.3-7+squeeze14
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 128M
max_execution_time: 60
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 20M
upload_max_filesize: 20M
session_save_path: /var/lib/php5 (1733)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)

Server Information:

Server Api: apache2handler
Server Db Type: MySQL (mysql)
Server Db Version: 5.1.63
Server Db Grants: Could not find a suitable "GRANT ALL" permission. This may mean you could have problems installing or removing modules. Or even adding and deleting items, including pages

----------------------------------------------

Re: Page specific logic not working (1.11.1)

Posted: Mon Aug 20, 2012 10:27 pm
by Jos
Works for me... My guess is that you don't have a {process_pagedata} tag on top of your template?

Re: Page specific logic not working (1.11.1)

Posted: Tue Aug 21, 2012 12:39 am
by applejack
Try process_whole_template: false

process_pagedata tag has nothing to do with it.

Re: Page specific logic not working (1.11.1)

Posted: Tue Aug 21, 2012 1:05 am
by calguy1000
@Jos is correct.

The process_whole_template config var has been removed in 1.11

Re: Page specific logic not working (1.11.1)

Posted: Tue Aug 21, 2012 1:24 am
by applejack
Ok thanks for the clarification and apologises to Jos, so now you need the process_pagedata tag in the head of the template as I have always removed it.

So which is processed first in the template smarty variables in the body or the head?

Re: Page specific logic not working (1.11.1)

Posted: Tue Aug 21, 2012 7:35 am
by Jos

Re: Page specific logic not working (1.11.1)

Posted: Tue Aug 21, 2012 8:40 am
by applejack
Thanks Jos as they say you learning something new everyday. Now where did I put that polyfill !!!

Re: Page specific logic not working (1.11.1)

Posted: Tue Aug 21, 2012 8:57 pm
by reto
Thanks for all the help so far.

this turned out to be quite a nasty issue but had nothing to do with the settings, but with the way CMSMS/Smarty3 parses the templates.

Here is the bug/issue:
I had

Code: Select all

<head profile="http://www.w3.org/2005/10/profile">
(see http://www.w3.org/2005/10/profile and http://www.w3.org/2005/10/howto-favicon for more information)

As it seems the parser expects probably
<head>
and will fail if there are attributes in the opening head tag.

My workaround: removed the attribute from the head tag.

Hope this helps anybody in debugging and I'd be glad to see this aknowledged as a bug.

Reto

Re: Page specific logic not working (1.11.1) [solved]

Posted: Fri Aug 24, 2012 9:26 pm
by calguy1000
The issue with the <head> tag should be fixed for the upcoming 1.11.2 release.