Customizing SMF > Modifications and Packages


<< < (1077/1083) > >>


I've noticed this error on my error log which I believe is related to this mod...

--- Quote ---forum/index.php?action=forum
8: Undefined variable: scripturl
File: /home/wnsecmxs/public_html/forum/Sources/BoardIndex.php
Line: 44
--- End quote ---

This is the section it is referring to...

--- Quote ---42:      // Set a canonical URL for this page.
43:      if (!empty($modSettings['sp_portal_mode']) && $modSettings['sp_portal_mode'] == 1)
==>44:         $context['canonical_url'] = $scripturl . '?action=forum';
45:      else
46:         $context['canonical_url'] = $scripturl;

--- End quote ---

I understand this is code that the simple portal modification adds, but from the package parse information it's not critical.

Should I just remove / undo this code?  Or can you please advise if there is a better solution?


Chen Zhen:

The edits are needed.
$scripturl is a global that should be located at the onset of that SMF function by default.
Although Simple Portal added the lines you posted, $scripturl should have been declared prior to using it.
Ensure that it is included in the list of globals at the beginning of the BoardIndex() function.

Will this be updated for 2.0.15?


--- Quote from: overdue ---Will this be updated for 2.0.15?

--- End quote ---

SP works fine on 2.0.15

Rock Lee:

--- Quote from: overdue on January 09, 2019, 01:31:45 PM ---Will this be updated for 2.0.15?
--- End quote ---

Maybe reading this will help you: How can I install a mod that doesn't work in my SMF version?



[0] Message Index

[#] Next page

[*] Previous page

Go to full version