1.6 > 1.6.1 (Error in News)

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
robbedoes
Forum Members
Forum Members
Posts: 75
Joined: Wed Aug 20, 2008 2:08 pm

1.6 > 1.6.1 (Error in News)

Post by robbedoes »

After updating from 1.6 to 1.6.1 I get the following messages in admin:

Notice: Undefined property: stdClass::$approve_link in /Volumes/Harddisk 2_1/websites/cmsms/tmp/templates_c/News^%%40^400^400810DA%%module_file_tpl%3ANews%3Barticlelist.tpl.php on line 132

Notice: Undefined property: stdClass::$deletelink in /Volumes/Harddisk 2_1/websites/cmsms/tmp/templates_c/News^%%40^400^400810DA%%module_file_tpl%3ANews%3Barticlelist.tpl.php on line 136

Notice: Undefined index: submit_massdelete in /Volumes/Harddisk 2_1/websites/cmsms/tmp/templates_c/News^%%40^400^400810DA%%module_file_tpl%3ANews%3Barticlelist.tpl.php on line 156


Create a user (editor), login , go to content/news
Last edited by robbedoes on Fri Jul 24, 2009 7:51 am, edited 1 time in total.
robbedoes
Forum Members
Forum Members
Posts: 75
Joined: Wed Aug 20, 2008 2:08 pm

[SOLVED] It’s debug info

Post by robbedoes »

After checking the code I found out the problem isn’t related to the update from cmsms 1.6 to 1.6.1.

When installing the news module, a permission "Modify News" as added to the editor group.
When an editor enters admin>news, function.admin_articlestab.php checks for the permissions Delete News and Approve News. When these permissions excist the vars deletelink, aprove_link and submit_massdelete are set.

The then called template articlelist.tpl assumes {$entry->approve_link}, {$entry->deletelink} and {$submit_massdelete} to excist. There are no checks for these vars.

After installing News, the editor group doesn’t get the permissions Delete News and Approve News. So {$entry->approve_link}, {$entry->deletelink} and {$submit_massdelete} raise an error when $config['debug'] is set to true.
Post Reply

Return to “CMSMS Core”