Results 1 to 10 of 298

Hybrid View

  1. #1
    Join Date
    Jan 2013
    Posts
    45
    Plugin Contributions
    0

    Default Re: Multi-Language Support for EZ-Pages

    I think so, there must be some other change for to function properly. I tried to change code as LAT9 write and system now don't write
    "WARNING: An Error occurred, please refresh the page and try again." error now there the page is opened, but there is no text for
    the the EZ page.

    Does anybody know?


    Quote Originally Posted by lat9 View Post
    @Design75, isn't there an additional change required? Lines 29-37 of the file you referenced currently read:
    Code:
    /* BOF Multilingual EZ Pages 1 of 3 */
    $sql = "SELECT e.*, et.*
            FROM  " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
            WHERE e.pages_id = " . (int)$ezpage_id . "
            AND et.languages_id = '" . (int)$_SESSION['languages_id'] . "'
            AND e.pages_id = " . et.pages_id;
    // comment the following line to allow access to pages which don't have a status switch set to Yes:
    $sql .= " AND (e.status_toc > 0 OR e.status_header > 0 OR e.status_sidebox > 0 OR e.status_footer > 0)";
    /* EOF Multilingual EZ Pages 1 of 3 */
    and should be changed, I think, as follows to prevent the log that @DarkMen identified:
    Code:
    /* BOF Multilingual EZ Pages 1 of 3 */
    $sql = "SELECT e.*, et.*
            FROM  " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
            WHERE e.pages_id = " . (int)$ezpage_id . "
            AND et.languages_id = '" . (int)$_SESSION['languages_id'] . "'
            AND e.pages_id = et.pages_id";
    // comment the following line to allow access to pages which don't have a status switch set to Yes:
    $sql .= " AND (e.status_toc > 0 OR e.status_header > 0 OR e.status_sidebox > 0 OR e.status_footer > 0)";
    /* EOF Multilingual EZ Pages 1 of 3 */

  2. #2
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Multi-Language Support for EZ-Pages

    Quote Originally Posted by DarkMen View Post
    I think so, there must be some other change for to function properly. I tried to change code as LAT9 write and system now don't write
    "WARNING: An Error occurred, please refresh the page and try again." error now there the page is opened, but there is no text for
    the the EZ page.

    Does anybody know?
    What is the condition of status for any of the options for that or any of your ez-pages? Ie. Table of contents, header, sidebox, or footer. Which if any are enabled?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    334
    Plugin Contributions
    0

    Default Re: Multi-Language Support for EZ-Pages

    This fixes it for me, I had the same trouble:
    1. Last line fixed as above
    2. 3rd line fixed in red


    Code:
    $sql = "SELECT e.*, et.*
            FROM  " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
            WHERE e.pages_id = '" . (int)$ezpage_id . "'
            AND et.languages_id = '" . (int)$_SESSION['languages_id'] . "'
            AND e.pages_id = et.pages_id";

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,931
    Plugin Contributions
    96

    Default Re: Multi-Language Support for EZ-Pages

    FWIW, you shouldn't need (and don't want) those single quotes around the ez_pages_id (assuming it's still an int(11) database type). That is, instead of


    $sql = "SELECT e.*, et.* FROM " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et WHERE e.pages_id = '" .(int)$ezpage_id. "' AND et.languages_id = '" . (int)$_SESSION['languages_id'] . "' AND e.pages_id = et.pages_id";
    the code should read:

    $sql = "SELECT e.*, et.* FROM " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et WHERE e.pages_id = " .(int)$ezpage_id. " AND et.languages_id = '" . (int)$_SESSION['languages_id'] . "' AND e.pages_id = et.pages_id";

  5. #5
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    334
    Plugin Contributions
    0

    Default Re: Multi-Language Support for EZ-Pages

    Hello lat9,
    Thanks for the correction, I tested and indeed that works just as well( aside: I tried to find out what the dot notation means here, but without success. I understand that if the variable is an integer then quotes are not required (field = int_value), but how is the languages_id part different, if it is also cast into an int? I tested, and there the single quotes do not seem to be required either. So the total query is then:
    Code:
    $sql = "SELECT e.*, et.*
            FROM  " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
            WHERE e.pages_id = ' . (int)$ezpage_id . "
            AND et.languages_id = ' . (int)$_SESSION['languages_id'] . "
            AND e.pages_id = et.pages_id";
    Is that consistent and correct?

  6. #6
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    334
    Plugin Contributions
    0

    Default Re: Multi-Language Support for EZ-Pages

    Addition: removal of single quotes can then be done similarly in line 7 of the pages_order_query around (int)$_SESSION['languages_id'] .

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,931
    Plugin Contributions
    96

    Default Re: Multi-Language Support for EZ-Pages

    Quote Originally Posted by gernot View Post
    Hello lat9,
    Thanks for the correction, I tested and indeed that works just as well( aside: I tried to find out what the dot notation means here, but without success. I understand that if the variable is an integer then quotes are not required (field = int_value), but how is the languages_id part different, if it is also cast into an int? I tested, and there the single quotes do not seem to be required either. So the total query is then:
    Code:
    $sql = "SELECT e.*, et.*
            FROM  " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
            WHERE e.pages_id = ' . (int)$ezpage_id . "
            AND et.languages_id = ' . (int)$_SESSION['languages_id'] . "
            AND e.pages_id = et.pages_id";
    Is that consistent and correct?
    Actually, you've got single-quotes (highlighted above) that should be a double-quote (or a debug-log will be generated):
    Code:
    $sql = "SELECT e.*, et.*
            FROM  " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
            WHERE e.pages_id = " . (int)$ezpage_id . "
            AND et.languages_id = ". (int)$_SESSION['languages_id'] . "
            AND e.pages_id = et.pages_id";

  8. #8
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    334
    Plugin Contributions
    0

    Default Re: Multi-Language Support for EZ-Pages

    Hello lat9,
    Sorry, it looks like that was a mistake in my quote (editing while posting not good idea!), I checked and I see in the current code I have double quotes as you state in your post. Whew, thanks for correcting that.

 

 

Similar Threads

  1. v150 EZ-Pages Meta tag fields + Multi-Language Support for EZ-Pages
    By ShopVille in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 11 Nov 2012, 09:25 PM
  2. "Multi-Language Support for EZ-Pages" prints "Array" in Sidebox
    By andreas.hennig in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 13 Jul 2010, 08:23 AM
  3. multi language ez-pages doesnt work for me
    By bluesky2008 in forum Addon Language Packs
    Replies: 2
    Last Post: 31 Jul 2008, 04:23 PM
  4. multi language button image in header, links to multi language pages
    By bluesky2008 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 31 Jul 2008, 04:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg