did you read the readme, it explains how to install the mod
did you read the readme, it explains how to install the mod
Zen cart installation / maintenance / customisation / hosting
Supported Modules: Dutch language pack, Multi site, Dynamic Price Updater and more.
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 :)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é
Last edited by Reneetje; 20 Sep 2015 at 10:10 PM. Reason: accidenty deleted one quote-mark
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++;
}
}
Zen cart installation / maintenance / customisation / hosting
Supported Modules: Dutch language pack, Multi site, Dynamic Price Updater and more.
@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;
}
}
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
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']);
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
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
Zen cart installation / maintenance / customisation / hosting
Supported Modules: Dutch language pack, Multi site, Dynamic Price Updater and more.
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!
Bookmarks