Forums / All Other Contributions/Addons / Multi-Language Support for EZ-Pages

Multi-Language Support for EZ-Pages

Views: 91,636

Results 281 to 298 of 298
18 Mar 2017, 3:43 PM
#281
darkmen avatar

darkmen

New Zenner

Join Date:
Jan 2013
Posts:
45
Plugin Contributions:
0

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

18 Mar 2017, 7:23 PM
#282
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Multi-Language Support for EZ-Pages

See this page for the corrected code. I will upload a new version to the downloads asap.> DarkMen:

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

26 Mar 2017, 1:02 PM
#283
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

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:

/* 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 = [B]" . [/B]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:

/* 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[B]"[/B];
// 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 */
26 Mar 2017, 8:09 PM
#284
darkmen avatar

darkmen

New Zenner

Join Date:
Jan 2013
Posts:
45
Plugin Contributions:
0

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?

lat9:

@Design75, isn't there an additional change required? Lines 29-37 of the file you referenced currently read:

/* 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 = [B]" . [/B]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:
> ```
/* 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[B]"[/B];
// 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 */
26 Mar 2017, 8:26 PM
#285
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Multi-Language Support for EZ-Pages

DarkMen:

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...

21 Oct 2017, 4:07 PM
#286
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

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

Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

21 Oct 2017, 6:06 PM
#287
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

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 = '" . /COLOR$ezpage_id[COLOR=#FF0000] . "' 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 = " . /COLOR$ezpage_id[COLOR=#FF0000] . " AND et.languages_id = '" . (int)$_SESSION['languages_id'] . "' AND e.pages_id = et.pages_id";

22 Oct 2017, 1:03 AM
#288
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

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:

$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?

Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

22 Oct 2017, 1:27 AM
#289
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

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'] .

Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

22 Oct 2017, 12:32 PM
#290
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: Multi-Language Support for EZ-Pages

gernot:

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:

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

Actually, you've got single-quotes (highlighted above) that should be a double-quote (or a debug-log will be generated):

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

22 Oct 2017, 12:39 PM
#291
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

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.

Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

24 Oct 2017, 2:57 PM
#292
shopville avatar

shopville

Zen Follower

Join Date:
Aug 2012
Posts:
331
Plugin Contributions:
0

Re: Multi-Language Support for EZ-Pages

frank18:

Has anyone got this mod working with ZC 1.5.3 ??

Just upgraded a site from 1.5.1 to 1.5.3 and all EZ-pages are showing NO title and NO text.... no matter which language is chosen

There are NO entries in the /logs folder :rant:

TOC shows fine though.

Cheers / Frank

facing the same issue!

11 Mar 2018, 1:36 PM
#293
hbhorsesbe avatar

hbhorsesbe

New Zenner

Join Date:
Jan 2018
Location:
Belgium
Posts:
12
Plugin Contributions:
0

Re: Multi-Language Support for EZ-Pages

Hello.

I have installed the v16 on zencart 1.5.5e of this ezpage multilanguage add-on.

When testing i can find in my logs the following generated sql that is returning an error:
SELECT e., et.
FROM ZEN_ezpages e, ZEN_ezpages_content et
WHERE e.pages_id =** (int)79**
AND et.languages_id = '2'
AND e.pages_id =** etpages_id** ...

In bold the 2 issues that are in this generated sql statement. What would work for me is:
SELECT e., et.
FROM ZEN_ezpages e, ZEN_ezpages_content et
WHERE e.pages_id =** '79'**
AND et.languages_id = '2'
AND e.pages_id =** et.pages_id** ...

Can you please advise me what i can do so the sql gets generated correctly?

Thank you
Bart

11 Mar 2018, 1:46 PM
#294
hbhorsesbe avatar

hbhorsesbe

New Zenner

Join Date:
Jan 2018
Location:
Belgium
Posts:
12
Plugin Contributions:
0

Re: Multi-Language Support for EZ-Pages

I have been able to solve the sql issue.

In the file: includes/modules/pages/page/header_php.php
At line29 i had to modify the sql statement to:

/* BOF Multilingual EZ Pages 1 of 3 /
$sql = "SELECT e.
, et.*
FROM " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
WHERE e.pages_id =** '" .$ezpage_id . "'**
AND et.languages_id = '" . (int)$_SESSION['languages_id'] . "'
AND e.pages_id =** et.pages_id";**

11 Mar 2018, 3:45 PM
#295
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Multi-Language Support for EZ-Pages

hbhorsesbe:

I have been able to solve the sql issue.

In the file: includes/modules/pages/page/header_php.php
At line29 i had to modify the sql statement to:

/* BOF Multilingual EZ Pages 1 of 3 /
$sql = "SELECT e.
, et.*
FROM " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
WHERE e.pages_id =** '" .$ezpage_id . "'**
AND et.languages_id = '" . (int)$_SESSION['languages_id'] . "'
AND e.pages_id =** et.pages_id";**
Thanks, I'll submit an updated version to the uploads soon.

14 Mar 2018, 2:08 AM
#296
jonasrullo avatar

jonasrullo

New Zenner

Join Date:
Sep 2009
Posts:
27
Plugin Contributions:
0

Re: Multi-Language Support for EZ-Pages

Confirmed; the new SQL line works for ZC 1.5.5f as well.

8 Jun 2018, 4:24 AM
#298
naugler72 avatar

naugler72

New Zenner

Join Date:
May 2018
Location:
Canada
Posts:
1
Plugin Contributions:
0

Re: Multi-Language Support for EZ-Pages

Hi, I need some help quickly! I just uploaded the EZPAGES_V17 to my site ( I am using 1.5.5f with the Yourstore template) according to the instructions provided in the README txt. Not only did it not appear in the admin but it broke my site as well. When I go to storefront the page loads in the browser with the favicon but the page itself doesn't load. It sites with the spinning icon like it is looking for a page that is not there. What have I done wrong and what can I do to fix the problem??
Thank you in advance for any guidance I might receive.