But all my ez pages look like this -ezp-30.html with no title text in the link. Have anyone fixed this for 1.3.9h
Printable View
But all my ez pages look like this -ezp-30.html with no title text in the link. Have anyone fixed this for 1.3.9h
You don't get URLs like -ezp-30.html in stock Zen Cart, so the issue is some incompatibility with whatever URL rewriter you are using.
Post in the support thread for that mod and see if the author can help.
Hi, pasi. Thanks for your great work! Could you please tell approximately when will your V1.5 version be ready for download?
I don't know if this is caused by multi-lang for ezpages, I don't think so but someone suggest me to check here:
My site used to be working fine, for unknown reason, it was screwed up now, all the ezpages do not show their contents, instead, it says: Array. the rest of the page is empty.
My site is here
Thanks. Any clue is appreciated.
I really hope we can get the 1.5 update for this module soon. I made site with two language using 1.5 now i realized older version of this plugin wont work on new zc and i am ready to scrap this project and go with older version of zc. what a shame .
Also opened up a 1.5 bilingual shop, and waiting on the update. Any news on the progress?! :D
I just installed 1.3.0.5v2.02 on my 1.3.8a zencart (taken from zen-cart.com addon page)
When I try to insert a new (the first) ez-page i receive the following error:
1054 Unknown column 'pages_title' in 'field list'
in:
[insert into ezpages (pages_title, page_open_new_window, page_is_ssl, alt_url, alt_url_external, status_header, status_sidebox, status_footer, status_toc, header_sort_order, sidebox_sort_order, footer_sort_order, toc_sort_order, toc_chapter, pages_html_text) values ('', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Array')]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
It seems so strange to me because pages_title is a field of ezpage_content table and not of ezpage one.
Another strange thing...in the distribution .zip there were some files with mispelled name: *langauge* instead of *language*
Is the distribution package corrupted?
More likely a typo, perhaps by someone whose first language is not English... or maybe a native English speaker, bad spelling is so common any more:)Quote:
*langauge* instead of *language*
Here's the solution to eliminate 1054 error in inserting new multilanguage ezpages.
In .../CUSTOM_ADMIN/ezpages.php you have to modify following block:
to:PHP Code:
$sql_data_array = array('pages_title' => $pages_title,
'page_open_new_window' => $page_open_new_window,
'page_is_ssl' => $page_is_ssl,
'alt_url' => $alt_url,
'alt_url_external' => $alt_url_external,
'status_header' => $status_header,
'status_sidebox' => $status_sidebox,
'status_footer' => $status_footer,
'status_toc' => $status_toc,
'header_sort_order' => $pages_header_sort_order,
'sidebox_sort_order' => $pages_sidebox_sort_order,
'footer_sort_order' => $pages_footer_sort_order,
'toc_sort_order' => $pages_toc_sort_order,
'toc_chapter' => $toc_chapter,
'pages_html_text' => $pages_html_text);
PHP Code:
$sql_data_array = array('page_open_new_window' => $page_open_new_window,
'page_is_ssl' => $page_is_ssl,
'alt_url' => $alt_url,
'alt_url_external' => $alt_url_external,
'status_header' => $status_header,
'status_sidebox' => $status_sidebox,
'status_footer' => $status_footer,
'status_toc' => $status_toc,
'header_sort_order' => $pages_header_sort_order,
'sidebox_sort_order' => $pages_sidebox_sort_order,
'footer_sort_order' => $pages_footer_sort_order,
'toc_sort_order' => $pages_toc_sort_order,
'toc_chapter' => $toc_chapter);
installed this module , i just noticed php warning in my debug log file regarding ezpages.php . here it is
PHP Warning: trim() expects parameter 1 to be string, array given in C:\wamp\www\test\admin\ezpages.php on line 140
PHP Warning: addslashes() expects parameter 1 to be string, array given in C:\wamp\www\test\admin\includes\functions\database.php on line 65
I really need to fix this , as this is the only warning i do get on entire site .
warning happens when i add or update ezpages ..
Hi everybody,
I have install 1.3.9h version and successfully install Greek language. When I try to install the module I get this 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 'TYPE=MyISAM' at line 9
in:
[CREATE TABLE IF NOT EXISTS ezpages_content ( pc_id int(11) NOT NULL auto_increment, pages_id int(11) NOT NULL default '0', languages_id int(11) NOT NULL default '1', pages_title varchar(64) NOT NULL default '', pages_html_text text, PRIMARY KEY (pc_id), KEY idx_ezpages_content (pages_id,languages_id) ) TYPE=MyISAM]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Any ideas for what it could be wrong???:blink:
Same question here, actually maybe this is one of the most used plugins on zen cart but nobody has updated it to 1.5 version. Even I think Ez Pages must be multilanguage by default. I hope this come within next zen cart update. PLEASE make update soon, We really need it...
Dear Sir
I need to make multi language zen website, I did that fine, but I need also the ez pages to have multi languages
I am using zencart 1.5 .
Is the multilanguage_ezpages_1.3.0.5v2.02 compatible with it?
thanks In advance
Hi Every Body,
are you there?
please help me.....
Just checking also
Can anyone confirm if the current version of multi-language ezpages will work on a new 1.5 install? This thread seems say it will.
http://www.zen-cart.com/showthread.p...50#post1098650
Has anyone successfully used this on version 1.3.9h for English & Spanish? Any known reason why it wouldn't work?
Thanks!
Hi this is my first ever post but I have used the forum for the last 9 months to help with version1.3.9 and would like to say thanks for everyone who has contributed as they have been a fantastic help to me, so I thought I should add my limited experience.
To answer the above question yes, I installed and have been using this mod with success for the last 9 months on my site which has english, italian and spanish. I don't recall any set up problems and it works perfectly.
I am now trying to install it on a new site with just english and spanish but using version 1.5....I have followed all the instructions but I do not get the install/uninstall link in admin and ez pages show :WARNING: An Error occurred, please refresh the page and try again.
I too noted like others that this mod was listed as one that did not require updating to be used with V 1.5.....has ANYONE managed to install it successfully and if so with what languages...if anyone can help it would be appreciated. For the time being all I can think to do is put all the information on one page under both languages...not ideal and also it creates problems if the titles are long displaying them in both languages ...help anyone?
Thanks
I can confirm that this mod does NOT work on 1.5. The latest version requires files to be put into the boxes/extra_boxes/ folder of admin/includes. This folder does not exist and does not work on zc 1.5.
Do you think that there will be a multilanguague EZ.pages module for ZC v1.5?
It works for me on v1.5.0. See my signature.
I've updated the Multi-Language EZ-Pages for zen cart v1.5.1. see attached file.
Please submit your update to the plugins section: http://www.zen-cart.com/downloads.php?do=file&id=36
I notice that the new version has the customized /includes/modules/ezpages_bar_footer.php & ezpages_bar_header.php and /includes/modules/sideboxes/ezpages.php in the core locations instead of in /CUSTOM/ override folders as the older version had.
It would be better to use override folders so those three files would not be automatically erased in an upgrade.
We all appreciate your work, neteasy... though in the spirit of making the mod the best it can be, I have some suggestions for the readme as well as PHP files.The first three files (readme text AND actual filenames) are misspelled, and ought to be corrected to "multilanguage". This is not your fault, as it dates from the beginning of the mod, but you can correct it.Quote:
NEW FILES:
These files are new and don't overwrite/over-ride any existing files:
includes/extra_datafiles/ezpages_multilangauge_database_names.php
admin/includes/extra_datafiles/ezpages_multilangauge_database_names.php
admin/includes/extra_datafiles/ezpages_multilangauge_filenames.php
admin/includes/languages/english/extra_definitions/ezpages_multilanguage_defines.php
admin/ezpages_install.php
admin/includes/boxes/extra_boxes/ezpages_install_tools_dhtml.php
========================================================
FILES TO OVER-RIDE
includes/modules/ezpages_bar_footer.php
includes/modules/ezpages_bar_header.php
includes/modules/sideboxes/ezpages.php
The admin files have been reworked for correct v1.5.x function, but the readme does not yet reflect this. Remove admin/includes/boxes/extra_boxes/ezpages_install_tools_dhtml.php and add the new files.
The "FILES TO OVER-RIDE" should really be changed back to the structure they originally had (readme text AND actual folders):Quote:
FILES TO OVER-RIDE
The following files go into your custom over-ride folders (replace CUSTOM with your own folder name):
includes/modules/CUSTOM/ezpages_bar_footer.php
includes/modules/CUSTOM/ezpages_bar_header.php
includes/modules/sideboxes/CUSTOM/ezpages.php
Thanks everyone.
An updated version has been submitted for approval. This includes the CUSTOM folder and correct filename.
I have installed the latest EZ Pages Multilanguage plugin on my site (www.fettsack.de/test) but the EZ pages doesnt show up in the footer.
I can add EZ pages trough the admin panel and can config both languages but when I insert them, as said they dont show up in my footer.
Any ideas whats wrong with my site??
It is a template from TM isn't it, you are using? It will probably be your problem. They removed standard ezpage functionality.
Yes it is a template from TM.
I just found out that when I switch to the classic template the EZ pages show up correctly.
You could ask the people at TM to repair the damage they did, or start comparing your footer files, from the default and your template, and add the needed code yourself.
Hello,
I have the EZ-Pages Meta tag fields mod installed http://www.zen-cart.com/downloads.php?do=file&id=746
And i'm trying to install the multilingual contribution but i'm getting confused when editing the files,
i was wondering if there's someone here that has already merged the files to work with both contributions and is willing to share
Thanks!
Hello!
I have a strange problem with multilanguage ezpages mod. When I edit ezpage it disappears from the catalog. I looked from my database and saw that the page content became empty in original ezpages table after I tried editing it. It moved to Ezpages_content table.
And why I can see ezpage name three times in the breadcrumb?
All language-specific content of ez-pages is stored in the ezpages_content table when you install the multilanguage mod. If I recall correctly, the installation SQL does the transferring. If you are not getting the content after installing, maybe you are missing a file. Check all files from the mod package against what is actually on your server and make sure they are the same. Admin mod files have to replace the originals, as there is no override for admin.
thanks a lot for that Great add-on
it works nice for Zencart1.5 and no errors
Really Great
After upgrading from 1.3.8 to 1.5.1 all plugin files are update and in place, yet going to any EX Pages throws up WARNING: An Error occurred, please refresh the page and try again. Also, there is nothing in Admin>Tools to uninstall and reinstall. It occurred to me that there might not be a link in the 1.5.1 Admin without an SQL update but I cannot update that without that uninstall/install link to begin with.
Since Install/Uninstall Multi-Language EZ-Pages is not showing in the Admin>Tools, I decided to run the file directly from site.com/admin/ezpages_install.php. First I uninstalled, then reinstalled. Then clicked Fix/Repair Multi-Language EZ-Pages database table for the heck of it. The good news is that the multi-language options have returned to the EZ-Pages Select a Page area now with a pesky "translate me" reminder (before I couldn't even see the titles in the title column). The bad news is that going to an EZ Page on the front end still throws up the WARNING: An Error occurred, please refresh the page and try again error.
No EZ Pages = No good. What's going on here and why can't I even see the Install/Uninstall Multi-Language EZ-Pages in the tools menu?
I read that page five times in the past two days. But DrByte inspired me to go back to the log directory to see what's going on. Hmm, no new logs, despite the errors. Then went to the admin, only to realize after updating my database for 1.5.1 it pulled in the old log directory location. After updating the location got to the logs and found:
So it wasn't this mod and in fact it was EZ-Pages Meta Tag Fields causing the error. Reinstalled the SQL and EZ Pages are back!Code:PHP Fatal error: 1054:Unknown column 'pages_meta_title' in 'field list' :: select pages_meta_title, pages_meta_keywords, pages_meta_description FROM zen_ezpages WHERE pages_id = 6 in /html/includes/classes/db/mysql/query_factory.php on line 120
HOWEVER, that doesn't change the fact that the Install/Uninstall Multi-Language EZ-Pages option is still not showing up in the admin>tools, and now I hope I didn't screw anything up by running the file directly (uninstalled, reinstalled, then fixed).
Hi,
I've installed the mod, but my TOC is gone missing. Anybody know why?
I also tried to translate (copy paste from google) my existing ez-pages, but the translations turned in to "?????????" characters.
Please if anyone have any clues how to fix these. Thanks in advance
What does is Admin>EZ-Pages Settings>EZ-Pages Table of Contents for Chapters Status set as? 1 or 2?
Also, I am pretty sure this mode basically resets some EZ pages settings when running the install SQL (I could be wrong). But check out Tools>EZ-Pages click on one of your pages and re-check the Chapter/TOC settings for each.
Hi, thanks for replying.
The thing is, I also copy pasted translation from Google that I put in Home page (define main page in admin) and its working fine showing the Chinese and Arabic characters.
I just don't understand why it doesn't work the same on EZ-Pages.
Hi pricediscrimination,
I've managed to get the TOC back to show.
Somehow the header_php.php in my installed template changed, there was a double lines, maybe created by the MOD override files. I deleted the double line and all back to normal.
Thanks for replying. Much appreciated.
Hi,
i have it installed on my site.
As you can see www.kite-addic***tion.es/tienda (Remove the ***)
in the footer when you switch from one language to the other the EZpages translate correctly, however in the header under the info menu it only appears in spanish.
Hi guys,
I was wondering whether the translate me"-issue has been resolved? I've installed the Multi-Language Support for EZ-Pages. I've followed the installation instructions to the letter (no errors or anything). After the installation I received the notification that Multi-language EZ-Pages is installed and that I will need to edit every page to ensure the correct titles/content are set for each language.
Unfortunately, I'm unable to change any of the titles. The EZ-pages editor hasn't changed, and when I attempt to change titles, nothing changes. The titles just have "translate me" in front of them ((translate me) Home (translate me) New products (translate me) Specials (translate me) All products, etc).
I've also ran "Fix/Repair Multi-Language EZ-Pages database table" but to no avail.
Any ideas? :(
Extra information: the "translate me" notice is only present in front of the translated header titles (the Dutch header titles), even though I can't change either the Dutch or English title from the EZ-Page editor.
Where non-English text remains as ?????, in my case it turned out to be database collation settings, mine were originally a latin setting, I needed to change to to utf8_general_ci to make the Japanese readable.
Check the database table "ezpages_content" for the collation and fields "pages_title" and "pages_html_text".
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
Hello I installed Multi-Language EZ pages , But now not everything in the footer is showing;
This is my original footer file:
PHP Code:
<?php
/**
* ezpages bar (footer) - used to display links to EZ-Pages content in horizontal format (usually as a footer element)
*
* @package templateSystem
* @copyright Copyright 2009 Glenn Herbert
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: ezpages_bar_footer.php 6021 2007-03-17 16:34:19Z ajeh $
* Modified for EZ-Pages Footer Columns by Glenn Herbert (gjh42) 2009-10-06 (line 31)
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
$zco_notifier->notify('NOTIFY_START_EZPAGES_FOOTERBAR');
// test if bar should display:
if (EZPAGES_STATUS_FOOTER == '1' or (EZPAGES_STATUS_FOOTER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) {
// $page_query = $db->Execute("select * from " . TABLE_EZPAGES . " where status = 1 and languages_id=" . (int)$_SESSION['languages_id'] . " and
horizontal_sort_order > 0 order by horizontal_sort_order, pages_title");
if (isset($var_linksList)) {
unset($var_linksList);
}
$page_query = $db->Execute("select * from " . TABLE_EZPAGES . " where status_footer = 1 and footer_sort_order > 0 order by footer_sort_order,
pages_title");
if ($page_query->RecordCount()>0) {
$rows = 0;
while (!$page_query->EOF) {
$rows++;
$page_query_list_footer[$rows]['id'] = $page_query->fields['pages_id'];
$page_query_list_footer[$rows]['name'] = $page_query->fields['pages_title'];
$page_query_list_footer[$rows]['sort'] = $page_query->fields['footer_sort_order'];//ezpages_footer_columns
$page_query_list_footer[$rows]['altURL'] = '';
// if altURL is specified, check to see if it starts with "http", and if so, create direct URL, otherwise use a zen href link
switch (true) {
// external link new window or same window
case ($page_query->fields['alt_url_external'] != ''):
$page_query_list_footer[$rows]['altURL'] = $page_query->fields['alt_url_external'];
break;
// internal link new window
case ($page_query->fields['alt_url'] != '' and $page_query->fields['page_open_new_window'] == '1'):
$page_query_list_footer[$rows]['altURL'] = (substr($page_query->fields['alt_url'],0,4) == 'http') ?
$page_query->fields['alt_url'] :
($page_query->fields['alt_url']=='' ? '' : zen_href_link($page_query->fields['alt_url'], '', ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' :
'SSL'), true, true, true));
break;
// internal link same window
case ($page_query->fields['alt_url'] != '' and $page_query->fields['page_open_new_window'] == '0'):
$page_query_list_footer[$rows]['altURL'] = (substr($page_query->fields['alt_url'],0,4) == 'http') ?
$page_query->fields['alt_url'] :
($page_query->fields['alt_url']=='' ? '' : zen_href_link($page_query->fields['alt_url'], '', ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' :
'SSL'), true, true, true));
break;
}
// if altURL is specified, use it; otherwise, use EZPage ID to create link
$page_query_list_footer[$rows]['link'] = ($page_query_list_footer[$rows]['altURL'] =='') ?
zen_href_link(FILENAME_EZPAGES, 'id=' . $page_query->fields['pages_id'] . ($page_query->fields['toc_chapter'] > 0 ? '&chapter=' . $page_query->fields
['toc_chapter'] : ''), ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL')) :
$page_query_list_footer[$rows]['altURL'];
$page_query_list_footer[$rows]['link'] .= ($page_query->fields['page_open_new_window'] == '1' ? '" target="_blank' : '');
$page_query->MoveNext();
}
$var_linksList = $page_query_list_footer;
}
} // test for display
$zco_notifier->notify('NOTIFY_END_EZPAGES_FOOTERBAR');
?>
This is my edited file:
PHP Code:
<?php
/**
* ezpages bar (footer) - used to display links to EZ-Pages content in horizontal format (usually as a footer element)
*
* @package templateSystem
* @copyright Copyright 2009 Glenn Herbert
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: ezpages_bar_footer.php 6021 2007-03-17 16:34:19Z ajeh $
* Modified for EZ-Pages Footer Columns by Glenn Herbert (gjh42) 2009-10-06 (line 31)
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
$zco_notifier->notify('NOTIFY_START_EZPAGES_FOOTERBAR');
// test if bar should display:
if (EZPAGES_STATUS_FOOTER == '1' or (EZPAGES_STATUS_FOOTER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) {
// $page_query = $db->Execute("select * from " . TABLE_EZPAGES . " where status = 1 and languages_id=" . (int)$_SESSION['languages_id'] . " and horizontal_sort_order > 0 order by horizontal_sort_order, pages_title");
if (isset($var_linksList)) {
unset($var_linksList);
}
// query modified for multi-language support
$page_query = $db->Execute("select e.pages_id, e.page_open_new_window, e.page_is_ssl, e.alt_url, e.alt_url_external, e.toc_chapter, et.pages_title
from " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
where e.pages_id = et.pages_id
and et.languages_id = '" . (int)$_SESSION['languages_id'] . "'
and status_footer = 1 and footer_sort_order > 0 order by footer_sort_order, pages_title");
// end of modification
if ($page_query->RecordCount()>0) {
$rows = 0;
while (!$page_query->EOF) {
$rows++;
$page_query_list_footer[$rows]['id'] = $page_query->fields['pages_id'];
$page_query_list_footer[$rows]['name'] = $page_query->fields['pages_title'];
$page_query_list_footer[$rows]['sort'] = $page_query->fields['footer_sort_order'];//ezpages_footer_columns
$page_query_list_footer[$rows]['altURL'] = '';
// if altURL is specified, check to see if it starts with "http", and if so, create direct URL, otherwise use a zen href link
switch (true) {
// external link new window or same window
case ($page_query->fields['alt_url_external'] != ''):
$page_query_list_footer[$rows]['altURL'] = $page_query->fields['alt_url_external'];
break;
// internal link new window
case ($page_query->fields['alt_url'] != '' and $page_query->fields['page_open_new_window'] == '1'):
$page_query_list_footer[$rows]['altURL'] = (substr($page_query->fields['alt_url'],0,4) == 'http') ?
$page_query->fields['alt_url'] :
($page_query->fields['alt_url']=='' ? '' : zen_href_link($page_query->fields['alt_url'], '', ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL'), true, true, true));
break;
// internal link same window
case ($page_query->fields['alt_url'] != '' and $page_query->fields['page_open_new_window'] == '0'):
$page_query_list_footer[$rows]['altURL'] = (substr($page_query->fields['alt_url'],0,4) == 'http') ?
$page_query->fields['alt_url'] :
($page_query->fields['alt_url']=='' ? '' : zen_href_link($page_query->fields['alt_url'], '', ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL'), true, true, true));
break;
}
// if altURL is specified, use it; otherwise, use EZPage ID to create link
$page_query_list_footer[$rows]['link'] = ($page_query_list_footer[$rows]['altURL'] =='') ?
zen_href_link(FILENAME_EZPAGES, 'id=' . $page_query->fields['pages_id'] . ($page_query->fields['toc_chapter'] > 0 ? '&chapter=' . $page_query->fields['toc_chapter'] : ''), ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL')) :
$page_query_list_footer[$rows]['altURL'];
$page_query_list_footer[$rows]['link'] .= ($page_query->fields['page_open_new_window'] == '1' ? '" target="_blank' : '');
$page_query->MoveNext();
}
$var_linksList = $page_query_list_footer;
}
} // test for display
$zco_notifier->notify('NOTIFY_END_EZPAGES_FOOTERBAR');
?>
And this i s the file from the mod:
PHP Code:
<?php
/**
* ezpages bar (footer) - used to display links to EZ-Pages content in horizontal format (usually as a footer element)
*
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: ezpages_bar_footer.php 2006-05-16 bunyip $
* @modified from standard file to provide multi-language support
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
$zco_notifier->notify('NOTIFY_START_EZPAGES_FOOTERBAR');
// test if bar should display:
if (EZPAGES_STATUS_FOOTER == '1' or (EZPAGES_STATUS_FOOTER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) {
// $page_query = $db->Execute("select * from " . TABLE_EZPAGES . " where status = 1 and languages_id=" . (int)$_SESSION['languages_id'] . " and horizontal_sort_order > 0 order by horizontal_sort_order, pages_title");
if (isset($var_linksList)) {
unset($var_linksList);
}
// query modified for multi-language support
$page_query = $db->Execute("select e.pages_id, e.page_open_new_window, e.page_is_ssl, e.alt_url, e.alt_url_external, e.toc_chapter, et.pages_title
from " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
where e.pages_id = et.pages_id
and et.languages_id = '" . (int)$_SESSION['languages_id'] . "'
and status_footer = 1 and footer_sort_order > 0 order by footer_sort_order, pages_title");
// end of modification
if ($page_query->RecordCount()>0) {
$rows = 0;
while (!$page_query->EOF) {
$rows++;
$page_query_list_footer[$rows]['id'] = $page_query->fields['pages_id'];
$page_query_list_footer[$rows]['name'] = $page_query->fields['pages_title'];
$page_query_list_footer[$rows]['altURL'] = '';
// if altURL is specified, check to see if it starts with "http", and if so, create direct URL, otherwise use a zen href link
switch (true) {
// external link new window or same window
case ($page_query->fields['alt_url_external'] != ''):
$page_query_list_footer[$rows]['altURL'] = $page_query->fields['alt_url_external'];
break;
// internal link new window
case ($page_query->fields['alt_url'] != '' and $page_query->fields['page_open_new_window'] == '1'):
$page_query_list_footer[$rows]['altURL'] = (substr($page_query->fields['alt_url'],0,4) == 'http') ?
$page_query->fields['alt_url'] :
($page_query->fields['alt_url']=='' ? '' : zen_href_link($page_query->fields['alt_url'], 'target="_blank', ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL'), true, true, true));
break;
// internal link same window
case ($page_query->fields['alt_url'] != '' and $page_query->fields['page_open_new_window'] == '0'):
$page_query_list_footer[$rows]['altURL'] = (substr($page_query->fields['alt_url'],0,4) == 'http') ?
$page_query->fields['alt_url'] :
($page_query->fields['alt_url']=='' ? '' : zen_href_link($page_query->fields['alt_url'], '', ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL'), true, true, true));
break;
}
// if altURL is specified, use it; otherwise, use EZPage ID to create link
$page_query_list_footer[$rows]['link'] = ($page_query_list_footer[$rows]['altURL'] =='') ?
zen_href_link(FILENAME_EZPAGES, 'id=' . $page_query->fields['pages_id'] . ($page_query->fields['toc_chapter'] > 0 ? '&chapter=' . $page_query->fields['toc_chapter'] : ''), ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL')) :
$page_query_list_footer[$rows]['altURL'];
$page_query_list_footer[$rows]['link'] .= ($page_query->fields['page_open_new_window'] == '1' ? '" target="_blank' : '');
$page_query->MoveNext();
}
$var_linksList = $page_query_list_footer;
}
} // test for display
$zco_notifier->notify('NOTIFY_END_EZPAGES_FOOTERBAR');
?>
Maybe someone can help me . I cant figure it out what is wrong
Thank you
fixed it with:
Code:$page_query = $db->Execute("SELECT e.*, et.pages_title
FROM " . TABLE_EZPAGES . " e
LEFT JOIN " . TABLE_EZPAGES_TEXT . " et ON (e.pages_id = et.pages_id)
WHERE et.languages_id = '" . (int)$_SESSION['languages_id'] . "'
AND e.status_footer = 1
AND e.footer_sort_order > 0
ORDER BY e.header_sort_order, et.pages_title");
I use 1.5.4
Nobody to take charge of the package? My background is unfortunately not sufficient....
What is the "CUSTOM" folder (in modules) supposed to be?
This is new:This is old:Quote:
$sql = "select * from " . TABLE_EZPAGES . " where pages_id = " . (int)$ezpage_id;
// comment the following line to allow access to pages which don't have a status switch set to Yes:
$sql .= " AND (status_toc > 0 or status_header > 0 or status_sidebox > 0 or status_footer > 0)";
// Check to see if page exists and is accessible, retrieving relevant details for display if found
$var_pageDetails = $db->Execute($sql);
// redirect to home page if page not found (or deactivated/deleted):
if ($var_pageDetails->EOF) {
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
$messageStack->add_session('header', ERROR_PAGE_NOT_FOUND, 'caution');
header('HTTP/1.1 404 Not Found');
zen_redirect(zen_href_link(FILENAME_DEFAULT));
}
How should I merge?Quote:
$var_pageDetails = $db->Execute("select e.pages_id, e.page_open_new_window, e.page_is_ssl, e.alt_url, e.alt_url_external, e.header_sort_order, e.sidebox_sort_order,
e.footer_sort_order, e.toc_sort_order, e.toc_chapter, e.status_header, e.status_sidebox, e.status_footer, status_toc, et.pages_title,
et.pages_html_text
from " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
where e.pages_id = et.pages_id
and et.languages_id = '" . (int)$_SESSION['languages_id'] . "'
and e.pages_id = " . (int)$ezpage_id );
This is what I made of it in my "public_html/includes/modules/pages/page/header_php.php"
PHP Code:
<?php
/**
* ez_pages ("page") header_php.php
*
* @package page
* @copyright Copyright 2003-2014 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version GIT: $Id: Author: DrByte Jun 1 2014 -0500 Modified in v1.5.3 $
* @version $Id: header_php.php 4881 2006-11-04 17:51:31Z ajeh $
* @modified from standard file to provide multi-language support
*/
/*
* This "page" page is the display component of the ez-pages module
* It is called "page" instead of "ez-pages" due to the way the URL would display in the browser
* Aesthetically speaking, "page" is more professional in appearance than "ez-page" in the URL
*
* The EZ-Pages concept was adapted from the InfoPages contribution for Zen Cart v1.2.x, with thanks to Sunrom et al.
*/
// This should be first line of the script:
$zco_notifier->notify('NOTIFY_HEADER_START_EZPAGE');
$ezpage_id = (int)$_GET['id'];
if ($ezpage_id == 0) {
zen_redirect(zen_href_link(FILENAME_DEFAULT));
}
$chapter_id = (int)$_GET['chapter'];
$chapter_link = (int)$_GET['chapter'];
//die('I SEE ' . $ezpage_id . ' - ' . $group_id);
//die('I SEE ' . $ezpage_id . ' - ' . $chapter_id);
$sql = "SELECT *
FROM " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
WHERE e.pages_id = et.pages_id
AND et.languages_id = '" . (int)$_SESSION['languages_id'] . "'
AND e.pages_id = " . (int)$ezpage_id;
// comment the following line to allow access to pages which don't have a status switch set to Yes:
$sql .= " AND (status_toc > 0
or status_header > 0
or status_sidebox > 0
or status_footer > 0)";
// Check to see if page exists and is accessible, retrieving relevant details for display if found
$var_pageDetails = $db->Execute($sql);
// redirect to home page if page not found (or deactivated/deleted):
if ($var_pageDetails->EOF) {
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
$messageStack->add_session('header', ERROR_PAGE_NOT_FOUND, 'caution');
header('HTTP/1.1 404 Not Found');
header('Status: 404 Not Found');
zen_redirect(zen_href_link(FILENAME_DEFAULT));
}
//check db for prev/next based on sort orders
$pos = (isset($_GET['pos'])) ? $_GET['pos'] : 'v'; // v for vertical, h for horizontal (v assumed if not specified)
$vert_links = array();
$toc_links = array();
// $pages_order_query = "SELECT pages_id FROM " . TABLE_EZPAGES . " WHERE status = 1 and vertical_sort_order <> 0 ORDER BY vertical_sort_order, horizontal_sort_order, pages_title";
// $pages_order_query = "SELECT * FROM " . TABLE_EZPAGES . " WHERE ((status_sidebox = 1 and sidebox_sort_order <> 0) or (status_footer = 1 and footer_sort_order <> 0) or (status_header = 1 and header_sort_order <> 0)) and alt_url_external = '' ORDER BY header_sort_order, sidebox_sort_order, footer_sort_order, pages_title";
// next query modified for multi-language support
$pages_order_query = "SELECT *
FROM " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
WHERE ((status_toc = 1 and toc_sort_order <> 0) and toc_chapter= :chapterID )
AND alt_url_external = '' and alt_url = ''
AND et.languages_id = '" . (int)$_SESSION['languages_id'] . "'
AND e.pages_id = et.pages_id
ORDER BY toc_sort_order, et.pages_title";
// end modification
$pages_order_query = $db->bindVars($pages_order_query, ':chapterID', $chapter_id, 'integer');
$pages_ordering = $db->execute($pages_order_query);
while (!$pages_ordering->EOF) {
$vert_links[] = $pages_ordering->fields['pages_id'];
$toc_links[] = array('pages_id' => $pages_ordering->fields['pages_id'], 'pages_title' => $pages_ordering->fields['pages_title']);
$pages_ordering->MoveNext();
}
/*
// $pages_order_query = "SELECT pages_id FROM " . TABLE_EZPAGES . " WHERE status = 1 and horizontal_sort_order <> 0 ORDER BY horizontal_sort_order, pages_title";
$pages_order_query = "SELECT * FROM " . TABLE_EZPAGES . " WHERE status_footer = 1 and footer_sort_order <> 0 and alt_url_external = '' ORDER BY footer_sort_order, pages_title";
$pages_ordering = $db->execute($pages_order_query);
while (!$pages_ordering->EOF) {
$horiz_links[] = $pages_ordering->fields['pages_id'];
$pages_ordering->MoveNext();
}
*/
// now let's determine prev/next
reset($vert_links);
$counter = 0;
$previous_v = -1;
$last_v = 0;
$previous_vssl = '0';
$next_item_v = 0;
$next_vssl = 0;
while (list($key, $value) = each($vert_links)) {
if ($value == $ezpage_id) {
$position_v = $counter;
$previous_vssl = '0';
if ($key == 0) {
$previous_v = -1; // it was the first to be found
} else {
$previous_v = $vert_links[$key - 1];
}
$next_vssl = '0';
if ($vert_links[$key + 1]) {
$next_item_v = $vert_links[$key + 1];
} else {
$next_item_v = $vert_links[0];
}
}
$last_v = $value;
$counter++;
}
if ($previous_v == -1) {
$previous_v = $last_v;
}
/*
//prev/next for horiz now
reset ($horiz_links);
$counter = 0;
while (list($key, $value) = each ($horiz_links)) {
if ($value == $ezpage_id) {
$position_h = $counter;
$previous_hssl = '0';
if ($key == 0) {
$previous_h = -1; // it was the first to be found
} else {
$previous_h = $horiz_links[$key - 1];
}
$next_hssl = '0';
if ($horiz_links[$key + 1]) {
$next_item_h = $horiz_links[$key + 1];
} else {
$next_item_h = $horiz_links[0];
}
}
$last_h = $value;
$counter++;
}
if ($previous_h == -1) $previous_h = $last_h;
*/
if (!isset($pos) || empty($pos) || $pos == 'v') {
$prev_link = zen_href_link(FILENAME_EZPAGES, 'id=' . $previous_v . '&pos=v' . '&chapter=' . $chapter_link, ($previous_vssl == '0' ? 'NONSSL' : 'SSL'));
$next_link = zen_href_link(FILENAME_EZPAGES, 'id=' . $next_item_v . '&pos=v' . '&chapter=' . $chapter_link, ($next_vssl == '0' ? 'NONSSL' : 'SSL'));
} else {
$prev_link = zen_href_link(FILENAME_EZPAGES, 'id=' . $previous_h . '&pos=h' . '&chapter=' . $chapter_link, ($previous_hssl == '0' ? 'NONSSL' : 'SSL'));
$next_link = zen_href_link(FILENAME_EZPAGES, 'id=' . $next_item_h . '&pos=h' . '&chapter=' . $chapter_link, ($next_hssl == '0' ? 'NONSSL' : 'SSL'));
}
$previous_button = zen_image_button(BUTTON_IMAGE_PREVIOUS, BUTTON_PREVIOUS_ALT);
$next_item_button = zen_image_button(BUTTON_IMAGE_NEXT, BUTTON_NEXT_ALT);
$home_button = zen_image_button(BUTTON_IMAGE_CONTINUE, BUTTON_CONTINUE_ALT);
// set Page Title for heading, navigation, etc
define('NAVBAR_TITLE', $var_pageDetails->fields['pages_title']);
define('HEADING_TITLE', $var_pageDetails->fields['pages_title']);
$breadcrumb->add($var_pageDetails->fields['pages_title']);
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
// Pull settings from admin switches to determine what, if any, header/column/footer "disable" options need to be set
// Note that these are defined normally under Admin->Configuration->EZ-Pages-Settings
if (!defined('EZPAGES_DISABLE_HEADER_DISPLAY_LIST')) {
define('EZPAGES_DISABLE_HEADER_DISPLAY_LIST', '');
}
if (!defined('EZPAGES_DISABLE_FOOTER_DISPLAY_LIST')) {
define('EZPAGES_DISABLE_FOOTER_DISPLAY_LIST', '');
}
if (!defined('EZPAGES_DISABLE_LEFTCOLUMN_DISPLAY_LIST')) {
define('EZPAGES_DISABLE_LEFTCOLUMN_DISPLAY_LIST', '');
}
if (!defined('EZPAGES_DISABLE_RIGHTCOLUMN_DISPLAY_LIST')) {
define('EZPAGES_DISABLE_RIGHTCOLUMN_DISPLAY_LIST', '');
}
if ($ezpage_id > 0) {
if (in_array($ezpage_id, explode(",", EZPAGES_DISABLE_HEADER_DISPLAY_LIST)) || strstr(EZPAGES_DISABLE_HEADER_DISPLAY_LIST, '*')) {
$flag_disable_header = true;
}
if (in_array($ezpage_id, explode(",", EZPAGES_DISABLE_FOOTER_DISPLAY_LIST)) || strstr(EZPAGES_DISABLE_FOOTER_DISPLAY_LIST, '*')) {
$flag_disable_footer = true;
}
if (in_array($ezpage_id, explode(",", EZPAGES_DISABLE_LEFTCOLUMN_DISPLAY_LIST)) || strstr(EZPAGES_DISABLE_LEFTCOLUMN_DISPLAY_LIST, '*')) {
$flag_disable_left = true;
}
if (in_array($ezpage_id, explode(",", EZPAGES_DISABLE_RIGHTCOLUMN_DISPLAY_LIST)) || strstr(EZPAGES_DISABLE_RIGHTCOLUMN_DISPLAY_LIST, '*')) {
$flag_disable_right = true;
}
}
// end flag settings for sections to disable
// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_EZPAGE');
Is there any database issues - if I now apply the (code) changes to my site?
I got aonHave done code additions/alterations as per plugin and corrections below!Quote:
EZ-Pages Select a page ...
WARNING: An Error occurred, please refresh the page and try again.
Couldn't enter the whole ezpages.php file!
OK, got it zipped: Attachment 14916
did you read the readme, it explains how to install the mod
Got caught up in the merging of new and old. Now the issue is resolved. Thank's for your guidance.
After installing 1.5.4 (it is live and working properly) with ez-pages I have only these logfiles left.....and I cannot seem to find the ways how to fix these here on the forum..all help is appreciated!
I hope someone is able to offer the solution for one or both of these warnings, it would be great to have no log-files at all, right :)Quote:
PHP Warning: trim() expects parameter 1 to be string, array given in D:\www\blabla\www\blabla\admin\ezpages.php on line 140
PHP Warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in D:\www\blabla.nl\www\blabla\includes\classes\db\mysql\query_factory.php on line 115
René
If I am correct those lines around 140 in YOUR_ADMIN/ezpage.php, look now like this
try changing it toPHP Code:
if ($pages_html_text != '' and strlen(trim($pages_html_text)) > 6) {
$zv_link_method_cnt++;
}
PHP Code:
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
if ($pages_html_text[$languages[$i]['id']] != '' and strlen(trim($pages_html_text[$languages[$i]['id']])) > 6) {
$zv_link_method_cnt++;
}
}
@Design75
Thank you very much for your information, ezpages.php file is now changed...now wait and see if any log-files will still appear, but I guess not :)
René
Minor correction to the above because the line(s) that follow are a check against $zv_link_method_cnt to ensure that there is one and only one assignment to any of html_text, an internal link, or an external link. If two or more of those have an assignment then an error message is presented.
Because in this multi-language module there is only one aspect that is multi-language (the html_text) and not a different option for each of the above three, then if any of the three are populated then none of the other three should be. Therefore in the replacement code, if any of the language text boxes are populated (need not be all of them) then don't increment $zv_link_method_cnt any more after the first time it is incremented (break)...
In YOUR_ADMIN/ezpage.php, "looked" like this
should be changed to:PHP Code:
if ($pages_html_text != '' and strlen(trim($pages_html_text)) > 6) {
$zv_link_method_cnt++;
}
PHP Code:
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
if ($pages_html_text[$languages[$i]['id']] != '' and strlen(trim($pages_html_text[$languages[$i]['id']])) > 6) {
$zv_link_method_cnt++;
break;
}
}
Found to have the same error message (different line number) while trying to verify that this was installed into a ZC 1.5.4 system. Occurred when I was trying to store an EZ-Page that had an html message populated in both of the available language boxes. When I returned to review the status of the ez-page, all of the content was missing because of the error stopping any further data storage. So, this is what I did to resolve it. FYI, system used has PHP 5.3.29.
Where this code was as below:
It was modified to the below:Code:if ($zv_link_method_cnt > 1) {
$messageStack->add(ERROR_MULTIPLE_HTML_URL, 'error');
$page_error = true;
}
if ($page_error == false) {
$sql_data_array = array('pages_title' => $pages_title,
'page_open_new_window' => $page_open_new_window,
'page_is_ssl' => $page_is_ssl,
'alt_url' => $alt_url,
'alt_url_external' => $alt_url_external,
'status_header' => $status_header,
'status_sidebox' => $status_sidebox,
'status_footer' => $status_footer,
'status_toc' => $status_toc,
'header_sort_order' => $pages_header_sort_order,
'sidebox_sort_order' => $pages_sidebox_sort_order,
'footer_sort_order' => $pages_footer_sort_order,
'toc_sort_order' => $pages_toc_sort_order,
'toc_chapter' => $toc_chapter,
'pages_html_text' => $pages_html_text);
if ($action == 'insert') {
zen_db_perform(TABLE_EZPAGES, $sql_data_array);
$pages_id = $db->insert_ID();
$languages = zen_get_languages();
$pages_title_array = zen_db_prepare_input($_POST['pages_title']);
What this does is ensure that TABLE_EXPAGES has the data of the first language box, but doesn't send the two fields as an array and addressed the reported error.Code:if ($zv_link_method_cnt > 1) {
$messageStack->add(ERROR_MULTIPLE_HTML_URL, 'error');
$page_error = true;
}
if ($page_error == false) {
$sql_data_array = array('pages_title' => $pages_title[$languages[0]['id']],
'page_open_new_window' => $page_open_new_window,
'page_is_ssl' => $page_is_ssl,
'alt_url' => $alt_url,
'alt_url_external' => $alt_url_external,
'status_header' => $status_header,
'status_sidebox' => $status_sidebox,
'status_footer' => $status_footer,
'status_toc' => $status_toc,
'header_sort_order' => $pages_header_sort_order,
'sidebox_sort_order' => $pages_sidebox_sort_order,
'footer_sort_order' => $pages_footer_sort_order,
'toc_sort_order' => $pages_toc_sort_order,
'toc_chapter' => $toc_chapter,
'pages_html_text' => $pages_html_text[$languages[0]['id']]);
if ($action == 'insert') {
zen_db_perform(TABLE_EZPAGES, $sql_data_array);
$pages_id = $db->insert_ID();
$languages = zen_get_languages();
$pages_title_array = zen_db_prepare_input($_POST['pages_title']);
Version 1.6 has een submitted to the plugins section, and will be available once released.
- Files updated files for Zen Cart 1.5.5a
- Renamed CUSTOM folders to YOUR_TEMPLATE
- Renamed admin folder to YOUR_ADMIN
- Updated some sql queries
- Added comments to mark code change more clearly
Dear Friends,
I would like to ask. I installed this module to ZC 1.5.5, made everything as author write in README file and now, when I click to EZ page name (in header or footer menu), web write only: WARNING: An Error occurred, please refresh the page and try again.
I tried complete clear of EZPAGES tables in SQL, but there is no change.
I really don't know, what to do. Can someone help me? Thanks in advance
@DarkMan, when you see the message WARNING: An Error occurred, please refresh the page and try again., there is a myDEBUG-*.log file present in your /logs directory that contains the details of the error.
Note: If a file's name starts with myDEBUG-adm-, then that file identifies an admin-related issue and includes your secret admin folder name. If you post the contents of one of those files (using the #/CODE button in the menu-bar when you are writing your post), make sure to xxx-out that admin-folder-name!
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
See this page for the corrected code. I will upload a new version to the downloads asap.
@Design75, isn't there an additional change required? Lines 29-37 of the file you referenced currently read:
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 */
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 */
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?
This fixes it for me, I had the same trouble:
- Last line fixed as above
- 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";
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";
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:
Is that consistent and correct?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";
Addition: removal of single quotes can then be done similarly in line 7 of the pages_order_query around (int)$_SESSION['languages_id'] .
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";
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.
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
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";
Confirmed; the new SQL line works for ZC 1.5.5f as well.
Version 1.7 will be submitted today to the downloads.
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.