SimplePortal
Support => Install and Upgrade => Topic started by: ca99uk on July 12, 2013, 03:39:47 AM
-
Hello Everyone,
I have just upgraded to 2.3.5 and now have lots of the following errors in the error log:
8: Undefined index: can_make_articleApply Filter: Only show the errors from this fileFile: "path"/Display.template.php (main sub template - eval?)
Line: 174
When looking at the template have the following code:
// Make Article Button
if ($context['can_make_article'] && !empty($modSettings['articleactive']))
$normal_buttons['article'] = array('text' => 'sp-' . ($context['topic_is_article'] ? 'remove' : 'add') . '_article', 'image' => 'addarticle.gif', 'lang' => true, 'url' => $scripturl . '?action=portal;sa=' . ($context['topic_is_article'] ? 'remove' : 'add') . 'article;message=' . $context['topic_first_message'] . ';return=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']);
I did a search on the forums that said it related to a failed removal as the code shouldn't be there but just wondered if there is anyway I can fix this?
Many thanks for any help.
-
Finding bits of code that shouldnt be there is probably very difficult.
Always check the warnings when the package manager installs or uninstalls. If you do not watch carefully and mod code is not put in the intended place or not removed - this is what happens.
Easy way is start over - get SMF large upgrade package. To be safe, delete all the files you do not need (I often keep avatars, attachments folders etc).
Keep the settings.php and ftp all the large upgrade files to your server. Follow the instructions - see the SMF site.
When done, reinstall your mods and Simple Portal. In future I would avoid too many mods or mods that need manual edits.
-
hmm is strange as I haven't got that many mods installed and no errors were shown during the install / uniinstall bit.
I was hoping it would kind of be a line of code that needed updating, it giving any problems, just this error message. Will have to think if its worth the hassell to get it rectified.
Thanks for your help though.
-
Many mods produce log errors but if non-critical - dont break your site, then its not worth worrying about. Not unless they produce thousands of errors each day.
I have hundreds of log errors every few days... but I need the mods.
-
Meh...
Error Log?
Don't think I even looked at any of my site's logs this week....LOL
-
The add article button code in 2.3.5 should look like this:
// Article related buttons...
if (!empty($modSettings['articleactive']))
{
if ($context['can_add_article'] && !$context['topic_is_article'])
$normal_buttons['add_article'] = array('text' => 'sp-add_article', 'image' => 'addarticle.gif', 'lang' => true, 'url' => $scripturl . '?action=portal;sa=addarticle;message=' . $context['topic_first_message'] . ';return=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']);
if ($context['can_remove_article'] && $context['topic_is_article'])
$normal_buttons['remove_article'] = array('text' => 'sp-remove_article', 'image' => 'removearticle.gif', 'lang' => true, 'url' => $scripturl . '?action=portal;sa=removearticle;message=' . $context['topic_first_message'] . ';return=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']);
}
You probably added that button code to your custom theme's Display.template.php file manually, when you installed an older version of SimplePortal. So you just need to make sure that it's up-to-date.