Whilst trying to get to the bottom of http://forum.cmsmadesimple.org/index.ph ... 800.0.html, I came across a few other bugs.
(All with 1.8.2. Full system information at the end.)
[Bug 1] If a template has a {content} tag within a {* comment *}, it's treated as a real {content} tag when attempting to determine which blocks exist for a particular page and is therefore liable to lead to the "duplicate content block" error. For example, the following pseudo-template is treated as having a "duplicate content block" attempting to edit a page that uses it, even though it works properly when parsed for real.
{* This is a comment about a {content} tag *}
{content}
I suggest that comments should always be ignored when parsing templates - whether "for real" or just for working out which content blocks exist on a page.
[Bug 2] If a page uses named content blocks but doesn't use the default block the (a) the default content block isn't shown when editing the page (correct) but (b) when trying to save the page an error is given that there's no default content! I suggest that the fix for this is to check templates when saving them to ensure that the default content block is used somewhere (and not just in a comment!).
[Bug 3] If a named content block happens to appear before the default content block in a template then it makes the main content block appear second when editing pages, which is confusing for content editors. I suggest that the edit pane for the main content block should always appear first when editing pages, irrespective of the template.
Of these, only [Bug 3] is still impacting me. I mention the other 2 here because they might affect others. Please could one of the project leads let me know whether you'd like me to file bug reports in the "Bug Tracker" for any or all of these.
Thanks,
Andrew
--
----------------------------------------------
Cms Version: 1.8.2
Installed Modules:
CMSMailer: 2.0
FileManager: 1.0.2
MenuManager: 1.6.5
ModuleManager: 1.4
News: 2.10.6
nuSOAP: 1.0.2
Printing: 1.1.0
Search: 1.6.5
ThemeManager: 1.1.1
TinyMCE: 2.7.2
FrontEndUsers: 1.6.9
CustomContent: 1.5.3
Captcha: 0.4
CGExtensions: 1.17.2
Uploads: 1.9.1
Config Information:
php_memory_limit:
process_whole_template: false
output_compression: false
max_upload_size: 2000000
default_upload_permission: 664
url_rewriting: mod_rewrite
page_extension:
query_var: page
use_hierarchy: true
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true
Php Information:
phpversion: 5.2.4-2ubuntu5.10
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 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: No check because open basedir active
session_use_cookies: On (True)
xml_function: On (True)
Server Information:
Server Api: apache2handler
Server Db Type: MySQL (mysqli)
Server Db Version: 5.0.51a
----------------------------------------------
Template parsing in admin interface
Template parsing in admin interface
Last edited by arr28 on Thu Aug 26, 2010 2:18 pm, edited 1 time in total.
Re: Template parsing in admin interface
All templates require at least the {content} tag, and yes if it is in {* content *} it will still appear when editing a page as the {* *} is smarty comment meaning they don't get parsed when the page is rendered in front end and since edit page doesn't use smarty template engine it shows it...
Why would anyone do this?...
{* This is a comment about a {content} tag *}
{content}
Sorry but there is no way to enforce the use of {content} in a template, as some make templates that don't need it and then they would complain about it having to be in it...
I believe the old way of content block ordering did put the default content block at the top no matter what, you can always use the label='Your Default Content Label' parameter on the default content block so editors will know what is what when you have more than one content block...
Why would anyone do this?...
{* This is a comment about a {content} tag *}
{content}
Sorry but there is no way to enforce the use of {content} in a template, as some make templates that don't need it and then they would complain about it having to be in it...
I believe the old way of content block ordering did put the default content block at the top no matter what, you can always use the label='Your Default Content Label' parameter on the default content block so editors will know what is what when you have more than one content block...