content tag not processing smarty tags

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
JohnnyNM
Forum Members
Forum Members
Posts: 14
Joined: Sat Dec 03, 2011 11:32 pm

content tag not processing smarty tags

Post by JohnnyNM »

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

Cms Version: 1.10

Installed Modules:

CMSMailer: 2.0.2
CMSPrinting: 1.0
FileManager: 1.2.0
MenuManager: 1.7.6
MicroTiny: 1.1
ModuleManager: 1.5
News: 2.12.2
Search: 1.7
ThemeManager: 1.1.4
CGSimpleSmarty: 1.4.10
CGExtensions: 1.27.2
CGBlog: 1.8.1
Captcha: 0.4.5
Banners: 2.5.1
CGCalendar: 1.8.3


Config Information:

php_memory_limit:
process_whole_template: false
output_compression: false
max_upload_size: 2000000
default_upload_permission: 664
url_rewriting: none
page_extension:
query_var: id
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true


Php Information:

phpversion: 5.3.6
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 32M
max_execution_time: 30
output_buffering: On
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)


Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 5.0.92


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

There's my blurb.
The Problem: Any smarty tags I put into the page content aren't being processed for some reason. That includes anything from variables, user defined tags and modules. However place the same things directly into a template and it works as expected.
I don't have any other information on it as I'm a little stumped and google has come up dry, but if anyone has any thoughts I'd be grateful.
Cheers.
spcherub
Power Poster
Power Poster
Posts: 402
Joined: Fri Jun 06, 2008 5:54 pm

Re: content tag not processing smarty tags

Post by spcherub »

Is this a new install or an upgrade? Here's a couple of things you can try:

1. First upgrade to 1.10.2 (not that this is your problem, but better to have the latest version for various other reasons)

2. Disable the WYSIWYG on the page you are trying use a smarty tag in the content - make sure you disable it using the setting in the Options tab. Now enter the smarty tag and see if it makes a difference. There is small chance your WYSIWYG is mangling the { and } tags. Also make sure you don't have the tags {literal} and {/literal} surrounding the {content} tag in your template.

Hope this helps.
S
JohnnyNM
Forum Members
Forum Members
Posts: 14
Joined: Sat Dec 03, 2011 11:32 pm

Re: content tag not processing smarty tags

Post by JohnnyNM »

Cheers for that. I've upgraded to 1.10.2 and I've got not updates pending, but the problems still here, wysiwig not the problem either, and to make it more complicated...

I've figured out that anything placed in the Pages>Home>Content will display fine. That goes for CGBlog, CGCalendar, News, modules etc. However in any of the other pages nothing will display. It's just that Home page which is displaying; and even if I take a copy of the home page, rename it as something else, I get the same problem as with the rest of the pages. Anything placed in a template however displays fine.

The upgrade tells me that these commands are blocked by the server...? I'm not sure whether that would affect this though...
(show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open, allow_url_fopen)

Thirdly it crossed my mind that I did pull this database from the previous server. I recall having to correct certain things (ie. CGBlog tracks the article count with a separate table, but new install > zero count > back end errored after importing old database of articles.) I'm wondering whether it may be related to the transfer of info, but it was an error I just hadn't come across until now?

Thanks.
John.
spcherub wrote:Is this a new install or an upgrade? Here's a couple of things you can try:

1. First upgrade to 1.10.2 (not that this is your problem, but better to have the latest version for various other reasons)

2. Disable the WYSIWYG on the page you are trying use a smarty tag in the content - make sure you disable it using the setting in the Options tab. Now enter the smarty tag and see if it makes a difference. There is small chance your WYSIWYG is mangling the { and } tags. Also make sure you don't have the tags {literal} and {/literal} surrounding the {content} tag in your template.

Hope this helps.
S
JohnnyNM
Forum Members
Forum Members
Posts: 14
Joined: Sat Dec 03, 2011 11:32 pm

Re: content tag not processing smarty tags

Post by JohnnyNM »

Also, I've just tried directly editing the cms_content_props table Content column relating to a non-home page and it still doesn't show. :s
JohnnyNM
Forum Members
Forum Members
Posts: 14
Joined: Sat Dec 03, 2011 11:32 pm

Re: content tag not processing smarty tags

Post by JohnnyNM »

Ok, I've done a bit more testing and I don't think it's the server.

I reinstalled (new directory/database, the works) of 1.10.2 and I still had the same problem. I know I've got the problem with 1.10 as well. So I did a fresh install of 1.9.4.3 and the tags in the content are processing again.

Has something changed in the way the page processes tags that I've just not seen? An option/choice I've missed? Anyone have any clue?

Cheers,
J.
spcherub
Power Poster
Power Poster
Posts: 402
Joined: Fri Jun 06, 2008 5:54 pm

Re: content tag not processing smarty tags

Post by spcherub »

Can you post a link to a test site including the admin interface? You can send it via PM if you like.

-S
JohnnyNM
Forum Members
Forum Members
Posts: 14
Joined: Sat Dec 03, 2011 11:32 pm

Re: content tag not processing smarty tags

Post by JohnnyNM »

I'm not quite there with the posts to be able to pm yet. Maybe a lovelly MOD would let me have a few? :)
JohnnyNM
Forum Members
Forum Members
Posts: 14
Joined: Sat Dec 03, 2011 11:32 pm

Re: content tag not processing smarty tags

Post by JohnnyNM »

Ok, an update.
The wonderful 'spcherub' has solved my problem.

The config.php file was set as;

$config['query_var'] = 'id';

And 'id' is apparently used as part of the {content} tag output.
Something so simple can create an annoyance that can last months. Trust me! So worth avoiding setting it to that.

Keep it to $config['query_var'] = 'page';

Hope this helps someone else too.
J.
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: content tag not processing smarty tags

Post by Wishbone »

Did you set the value of query_var to 'id' ? I know that the installation asks, but I've never changed it before. If it's possible to change, and it doesn't work, it sounds like 'page' is hard-coded somewhere in the code.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1942
Joined: Mon Jan 29, 2007 4:47 pm

Re: content tag not processing smarty tags

Post by Jo Morg »

Wishbone wrote:Did you set the value of query_var to 'id' ? I know that the installation asks, but I've never changed it before. If it's possible to change, and it doesn't work, it sounds like 'page' is hard-coded somewhere in the code.
Actually I don't think 'page' is hard-coded, but 'id' is!
It's used by core and modules. I think that's why...
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: content tag not processing smarty tags

Post by Wishbone »

:) That makes sense.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: content tag not processing smarty tags

Post by Dr.CSS »

The 'page' part is used when it first installs if you don't use pretty URLs...

yoursite.com/index.php?page=

And yes 'id' is not a good idea as it is part of the whole system...
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: content tag not processing smarty tags

Post by Wishbone »

Dr.CSS wrote:The 'page' part is used when it first installs if you don't use pretty URLs...
Actually 'page' is still used even if you are using pretty URLs... You just don't see it.
.htaccess wrote:RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Locked

Return to “CMSMS Core”