Advertisement:

Author Topic: SimplePortal  (Read 1474832 times)

Offline WantSome

  • Jr. Member
  • **
  • Posts: 361
Re: SimplePortal
« Reply #5380 on: December 09, 2018, 03:26:12 PM »
Hello!

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

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;

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?

Thanks!

Offline Chen Zhen

  • Sophist Member
  • *****
  • Posts: 1,167
  • Gender: Male
  • If you're going through hell, keep going!
    • Underdog-01 on GitHub
    • WebDev.ca
Re: SimplePortal
« Reply #5381 on: December 12, 2018, 08:19:44 PM »

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.

My SMF Mods & Plug-Ins

WebDev
Simple Portal Support

Request politely & demand nothing.

Offline overdue

  • Semi-Newbie
  • *
  • Posts: 44
Re: SimplePortal
« Reply #5382 on: January 09, 2019, 01:31:45 PM »
Will this be updated for 2.0.15?
2.0.15; default theme - curve.

Offline Sh@mbles

  • SMF Hero
  • ******
  • Posts: 5,014
  • Gender: Male
    • i30 Owners Club
Re: SimplePortal
« Reply #5383 on: January 09, 2019, 01:32:40 PM »
Quote from: overdue
Will this be updated for 2.0.15?

SP works fine on 2.0.15

Online Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 2,095
  • Gender: Male
  • I also speak english :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: SimplePortal
« Reply #5384 on: January 09, 2019, 02:19:26 PM »
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Ayudame via PayPal

Offline overdue

  • Semi-Newbie
  • *
  • Posts: 44
Re: SimplePortal
« Reply #5385 on: January 09, 2019, 02:32:50 PM »
Will this be updated for 2.0.15?

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


Regards!
Awesome, thanks! I'll check this out.
2.0.15; default theme - curve.

Offline overdue

  • Semi-Newbie
  • *
  • Posts: 44
Re: SimplePortal
« Reply #5386 on: January 09, 2019, 03:55:16 PM »
Even though I used the emulator for 2.0.14. I'm getting a test fail on the sources sub.

13.    Execute Modification    ./Sources/Subs.php    Test failed
 9.    Replace    ./Sources/Subs.php    Test failed
2.0.15; default theme - curve.

Offline Sh@mbles

  • SMF Hero
  • ******
  • Posts: 5,014
  • Gender: Male
    • i30 Owners Club
Re: SimplePortal
« Reply #5387 on: January 09, 2019, 04:12:52 PM »
It's all there in the link provided, but to save you some time...

https://wiki.simplemachines.org/smf/Error_in_mod_installation