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.If you are not registered click here to signup.


  • Jimako
    Jimako  1 week ago

    I tried to update forum templates (remove custom things) but hit next issue. So unfinished again,

  • Jimako
    Jimako  2 weeks ago

    Updated Recaptcha plugin 1.2.1 posted on e107.org

  • Jimako
    Jimako  1 month ago

    Switched to bbcodes in forum. Now you can have it separate from rest of site. (I think that it's there longer time, just nobody told me this)

  • Jimako
    Jimako  2 months ago

    removed facebook comments support (both ways were available, removed workaround to do this)

  • Jimako
    Jimako  3 months ago

    @Evgura you can test it now, it's in download section.