How to fix missing e_PAGE with SEF-URL / Tip and tricks / Forums


  • Sometimes e_PAGE is not defined with SEF-URLs. It could be big problem with old plugins, because their logic depends on e_PAGE almost for sure.

    Fix for content plugin:

    if(defined("e_URL_LEGACY") && !defined("e_PAGE")) {
       if (strpos(e_URL_LEGACY, 'content.php') !== false)     {
        define("e_PAGE", 'content.php');
       }
       elseif (strpos(e_URL_LEGACY, 'content_manager.php') !== false)     {
         define("e_PAGE", 'content_manager.php');
       }
    }

    This code I originally used in e_meta.php to solve problem with canonical urls. But then I found that meta tags are related to e_PAGE too and it has to be set before HEADERF.

    (e_PAGETITLE was defined wrong way then)

    e_module was too soon
    e_meta and e_header were too late



     

Moderator(s):
Search just forum
Chatbox
You must be logged in to post comments on this site - please either log in from the Login box or from here.


  • Jimako
    Jimako  3 weeks ago

    @wrxxy I am ill, sorry cant log in gitter from mobile. Try ask at main room, nothing except update was changed.

  • Jimako
    Jimako  1 month ago

    @wrxxy I got notification from gitter but I am off until Monday. I am not able to log in gitter. Answer is add it to existing gitjub issue.

  • Jimako
    Jimako  3 months ago

    I will be on holiday until end of November. So no answers from me until then.

  • Jimako
    Jimako  3 months ago

    After 2 days I was able to create demo of BS Magazine 01 theme:
    https://v2demo.e107.sk/magazine01/

  • Jimako
    Jimako  3 months ago

    My antivirus software blocked and disabled gitter.