Page 29 of 30 FirstFirst ... 1927282930 LastLast
Results 281 to 290 of 298
  1. #281
    Join Date
    Jan 2013
    Posts
    45
    Plugin Contributions
    0

    Default Re: Multi-Language Support for EZ-Pages

    This is complete LOG:

    [18-Mar-2017 16:40:06 Europe/Prague] Request URI: /eshop155/test-001-ezp-1.html, IP address: 31.47.97.52
    #1 trigger_error() called at [/hosting/www/domain.com/www/web/includes/classes/db/mysql/query_factory.php:167]
    #2 queryFactory->show_error() called at [/hosting/www/domain.com/www/web/includes/classes/db/mysql/query_factory.php:139]
    #3 queryFactory->set_error() called at [/hosting/www/domain.com/www/web/includes/classes/db/mysql/query_factory.php:266]
    #4 queryFactory->Execute() called at [/hosting/www/domain.com/www/web/includes/modules/pages/page/header_php.php:49]
    #5 require(/hosting/www/domain.com/www/web/includes/modules/pages/page/header_php.php) called at [/hosting/www//domain.com/www/web/index.php:36]



    [18-Mar-2017 16:40:06 Europe/Prague] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int)1
    AND et.languages_id = '5'
    AND e.pages_id = etpages_id ' at line 3 :: SELECT e.*, et.*
    FROM ezpages e, ezpages_content et
    WHERE e.pages_id = (int)1
    AND et.languages_id = '5'
    AND e.pages_id = etpages_id AND (e.status_toc > 0 OR e.status_header > 0 OR e.status_sidebox > 0 OR e.status_footer > 0) ==> (as called by) /hosting/www/domain.com/www/web/includes/modules/pages/page/header_php.php on line 49 <== in /hosting/www/domain.com/www/web/includes/classes/db/mysql/query_factory.php on line 167

  2. #282
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Multi-Language Support for EZ-Pages

    See this page for the corrected code. I will upload a new version to the downloads asap.
    Quote Originally Posted by DarkMen View Post
    This is complete LOG:

    [18-Mar-2017 16:40:06 Europe/Prague] Request URI: /eshop155/test-001-ezp-1.html, IP address: 31.47.97.52
    #1 trigger_error() called at [/hosting/www/domain.com/www/web/includes/classes/db/mysql/query_factory.php:167]
    #2 queryFactory->show_error() called at [/hosting/www/domain.com/www/web/includes/classes/db/mysql/query_factory.php:139]
    #3 queryFactory->set_error() called at [/hosting/www/domain.com/www/web/includes/classes/db/mysql/query_factory.php:266]
    #4 queryFactory->Execute() called at [/hosting/www/domain.com/www/web/includes/modules/pages/page/header_php.php:49]
    #5 require(/hosting/www/domain.com/www/web/includes/modules/pages/page/header_php.php) called at [/hosting/www//domain.com/www/web/index.php:36]



    [18-Mar-2017 16:40:06 Europe/Prague] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int)1
    AND et.languages_id = '5'
    AND e.pages_id = etpages_id ' at line 3 :: SELECT e.*, et.*
    FROM ezpages e, ezpages_content et
    WHERE e.pages_id = (int)1
    AND et.languages_id = '5'
    AND e.pages_id = etpages_id AND (e.status_toc > 0 OR e.status_header > 0 OR e.status_sidebox > 0 OR e.status_footer > 0) ==> (as called by) /hosting/www/domain.com/www/web/includes/modules/pages/page/header_php.php on line 49 <== in /hosting/www/domain.com/www/web/includes/classes/db/mysql/query_factory.php on line 167

  3. #283
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,486
    Plugin Contributions
    88

    Default Re: Multi-Language Support for EZ-Pages

    @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 */

  4. #284
    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 */

  5. #285
    Join Date
    Jul 2012
    Posts
    16,733
    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...

  6. #286
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    266
    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";

  7. #287
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,486
    Plugin Contributions
    88

    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";

  8. #288
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    266
    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?

  9. #289
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    266
    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'] .

  10. #290
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,486
    Plugin Contributions
    88

    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";

 

 
Page 29 of 30 FirstFirst ... 1927282930 LastLast

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

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR