[Solved] CMSMS 2.0 - Modifiers

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.
Post Reply
lewishowles
Forum Members
Forum Members
Posts: 52
Joined: Tue Oct 25, 2011 4:45 pm

[Solved] CMSMS 2.0 - Modifiers

Post by lewishowles »

I'm finally getting chance to create my first website with 2.0! (woohoo!)

I'm in the very early stages and this is a fresh install - so far I'm basically pasting my HTML templates into the system and seeing how my defaults do (or don't) work. I'm not sure that there have been any real changes to the way modifiers work, but the issue I'm coming up against at the moment is CMS not recognising a modifier I've added. It's a modifier I use quite often.

The code in question is:

Code: Select all

{global_content name='youtube_video' assign='youtube_video'}
<__iframe class="aspect-ratio__item" src="https://www.youtube.com/embed/{$youtube_video|youtube_id}?autohide=1&showinfo=0" frameborder="0" allowfullscreen></__iframe>
And I've checked (a few times!) that the modifier has both been uploaded into the Plugins folder, and is listed in the Tags page in Admin as a modifier (screenshot attached).

The error is, of course:

Code: Select all

Syntax error in template "cms_template:appdata;tmp_template" on line 314 "<__iframe class="aspect-ratio__item" src="https://www.youtube.com/embed/{$youtube_video|youtube_id}?autohide=1&showinfo=0" frameborder="0" allowfullscreen></__iframe>" unknown modifier "youtube_id"
If anyone has any ideas, that would be awesome.

Version numbers of everything:

Code: Select all

----------------------------------------------
Cms Version: 2.0
Installed Modules:
AdminSearch: 1.0
CMSContentManager: 1.0
DesignManager: 1.0
FileManager: 1.5
MicroTiny: 2.0
ModuleManager: 2.0
Navigator: 1.0
News: 2.50
Search: 1.50

Config Information:
php_memory_limit:
max_upload_size: 10000000
url_rewriting: none
page_extension:
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: America/New_York
permissive_smarty: false

Php Information:
phpversion: 5.5.27
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 2048
E_DEPRECATED: 0
test_file_timedifference:
test_db_timedifference:
memory_limit: 1000M
max_execution_time: 300
output_buffering: On
file_uploads: On (True)
post_max_size: 100M
upload_max_filesize: 10M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)

Performance Information:
allow_browser_cache: Off (False)
browser_cache_expiry: 60
php_opcache: Off (False)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
smarty_cache_udt: Off (False)
auto_clear_cache_age: On (True)
Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.5.42
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No file system time difference found

----------------------------------------------
Attachments
youtube_id modifier installed
youtube_id modifier installed
youtube_id.png (9.64 KiB) Viewed 1734 times
Last edited by lewishowles on Wed Sep 16, 2015 2:54 pm, edited 1 time in total.
lewishowles
Forum Members
Forum Members
Posts: 52
Joined: Tue Oct 25, 2011 4:45 pm

Re: CMSMS 2.0 - Modifiers

Post by lewishowles »

Few more bits of info:

If I remove the modifier, the template (of course) works OK.

If I put ONLY that section of code (plus {content}) into the page, it comes up with the same error - which makes me think it's not some kind of conflict with another part of the template.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: CMSMS 2.0 - Modifiers

Post by Rolf »

What code is in the modifier?
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
lewishowles
Forum Members
Forum Members
Posts: 52
Joined: Tue Oct 25, 2011 4:45 pm

Re: CMSMS 2.0 - Modifiers

Post by lewishowles »

Ah ha, you got me. I didn't realise that

Code: Select all

smarty_cms_modifier
had changed to

Code: Select all

smarty_modifier
.

And of course now it works.

I figured it would be my fault.

Thanks!
Post Reply

Return to “CMSMS Core”