TY. Over to you, @strelitzia.
Printable View
TY. Over to you, @strelitzia.
I am getting a 500 error when trying to go to the config page in admin for ceon Version: 5.1.0 from the GitHub using zencart v1.5.8a and php 8.1. I added a .htaccess file to the directory. I get the following error in my log files.
[10-Sep-2023 21:00:19 America/Los_Angeles] PHP Fatal error: Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /home/folder/domain.com/admin/includes/classes/class.CeonURIMappingInstallOrUpgrade.php on line 467
I must have done something wrong. Could use a hand as I am have been trying to figure this one out for hours.
@jasonshanks It's some PHP code in that file that needs brackets adding, e.g.:
Should be something like:Code:'product_reviews' =>
isset($default_uri_parts[$default_language_code]['product_reviews']) ?
$default_uri_parts[$default_language_code]['product_reviews'] :
isset($default_uri_parts['en']['product_reviews']) ?
$default_uri_parts['en']['product_reviews'] : 'Reviews',
5 instances need replacing. I think you just have to edit it yourself, the latest blob at the repo I think is 'current' doesn't have this fix either. https://github.com/JSWebSteve/Ceon-U...lOrUpgrade.phpCode:'product_reviews' =>
isset($default_uri_parts[$default_language_code]['product_reviews']) ?
$default_uri_parts[$default_language_code]['product_reviews'] :
(isset($default_uri_parts['en']['product_reviews']) ?
$default_uri_parts['en']['product_reviews'] : 'Reviews'),
Thank you so much. I had uninstalled that copy out of frustration of not knowing what to do or how to find out. And was going to install 1.5.7 , but i think i will give it another shot. Thank you.
No worries. It's not the version of Zen Cart that's causing your problem, it's your PHP 8.1. I presume you had an earlier version last time this worked for you. From a quick search, see https://lindevs.com/nested-ternary-o...ses-in-php-8-0 "Since PHP 8.0, the nested ternary operators require explicit parentheses and using without them, a fatal error occurs."
I actually first ran into this in core Zen Cart, `enable_error_logging.php` used to have an ugly ternary operator when building its bitmask for log levels, but the latest version seems to have had this removed. A lot of work has been done by the faithful devs to fix a wide array of Errors since PHP 8.0, 8.1 and soon 8.2 turn old Deprecated warnings into Fatal Errors.
are these the 5 instances you mentioned ?
isset($default_uri_parts[$default_language_code]['product_reviews']) ?
$default_uri_parts[$default_language_code]['product_reviews'] :
isset($default_uri_parts['en']['product_reviews']) ?
$default_uri_parts['en']['product_reviews'] : 'Reviews',
'product_reviews_info' =>
isset($default_uri_parts[$default_language_code]['product_reviews_info']) ?
$default_uri_parts[$default_language_code]['product_reviews_info'] :
isset($default_uri_parts['en']['product_reviews_info']) ?
$default_uri_parts['en']['product_reviews_info'] : 'Review',
'product_reviews_write' =>
isset($default_uri_parts[$default_language_code]['product_reviews_write']) ?
$default_uri_parts[$default_language_code]['product_reviews_write'] :
isset($default_uri_parts['en']['product_reviews_write']) ?
$default_uri_parts['en']['product_reviews_write'] : 'Write a Review',
'tell_a_friend' => isset($default_uri_parts[$default_language_code]['tell_a_friend']) ?
$default_uri_parts[$default_language_code]['tell_a_friend'] :
isset($default_uri_parts['en']['tell_a_friend']) ?
$default_uri_parts['en']['tell_a_friend'] : 'Tell a Friend',
'ask_a_question' => isset($default_uri_parts[$default_language_code]['ask_a_question']) ?
$default_uri_parts[$default_language_code]['ask_a_question'] :
isset($default_uri_parts['en']['ask_a_question']) ?
$default_uri_parts['en']['ask_a_question'] : 'Ask a Question'
);
I tried doing the same thing to them all but still get 500 error. Gonna undo and try again.
I guess i am messing something up. But i can't for the life of me figure it out.
'product_reviews' =>
isset($default_uri_parts[$default_language_code]['product_reviews']) ?
$default_uri_parts[$default_language_code]['product_reviews'] :
(isset($default_uri_parts['en']['product_reviews']) ?
$default_uri_parts['en']['product_reviews'] : 'Reviews'),
'product_reviews_info' =>
isset($default_uri_parts[$default_language_code]['product_reviews_info']) ?
$default_uri_parts[$default_language_code]['product_reviews_info'] :
(isset($default_uri_parts['en']['product_reviews_info']) ?
$default_uri_parts['en']['product_reviews_info'] : 'Review'),
'product_reviews_write' =>
isset($default_uri_parts[$default_language_code]['product_reviews_write']) ?
$default_uri_parts[$default_language_code]['product_reviews_write'] :
(isset($default_uri_parts['en']['product_reviews_write']) ?
$default_uri_parts['en']['product_reviews_write'] : 'Write a Review'),
'tell_a_friend' => isset($default_uri_parts[$default_language_code]['tell_a_friend']) ?
$default_uri_parts[$default_language_code]['tell_a_friend'] :
(isset($default_uri_parts['en']['tell_a_friend']) ?
$default_uri_parts['en']['tell_a_friend'] : 'Tell a Friend'),
'ask_a_question' => isset($default_uri_parts[$default_language_code]['ask_a_question']) ?
$default_uri_parts[$default_language_code]['ask_a_question'] :
(isset($default_uri_parts['en']['ask_a_question']) ?
$default_uri_parts['en']['ask_a_question'] : 'Ask a Question'
);
I changed all 5 of them to be like yours but still getting 500 on the admin config page.
Your last one, ask_a_question, needs a final closing bracket.
(the final bracket after 'Ask a Question' matches the one on the previous line before isset).Code:'ask_a_question' => isset($default_uri_parts[$default_language_code]['ask_a_question']) ?
$default_uri_parts[$default_language_code]['ask_a_question'] :
(isset($default_uri_parts['en']['ask_a_question']) ?
$default_uri_parts['en']['ask_a_question'] : 'Ask a Question')
So i did a judo solution / temp fix. I just asked my host to downgrade my php to 7.4 which is what my main site has been running on with its 1.5.6 install. Now ceon works fine. I will try to watch some beginner videos on php so i can at least understand you guys when you try to help me. Again I apologize if i wasted your time. I know all of you do this stuff for free and I really appreciate everything all of you do.
PHP 7.4 (anything before 8.0) has reached EOL (end of life) and will not receive security updates. I'm surprised your host allowed you to do it. See https://www.php.net/supported-versions.php .. so, you should get back on 8.x ASAP. Get yourself a decent code editor with syntax highlighting (I use VSCode with PHP extensions installed), when you paste your code in there's a clear indication that there is a syntax error. You can delete sections of the code to narrow down exactly which bit is causing the syntax error, then put the deleted bits back and fix the error. Best option is to have a local development web server so you can run the site on your own PC before putting any changed files on your main server, that's definitely something I would try to aim for, but it sounds like you're a way away from that yet .. try to find a buddy who can sit with you and work through these early pain points to get you up and running. Took me about 20 seconds to fix the ternary operator problem just from experience. Maybe send me a private message for help :)
the current LTS of debian, is buster or debian 10; which comes packaged with php 7.3. the debian team backports all security fixes to this php version.
to update to a later version of php when running buster involves the use of 3rd party repos. which comes with it's own security risks.
given that buster is only supported to 6/2024; it is probably a good idea to plan to move onto bullseye or bookworm if running debian.
but the idea that security fixes are not being done is much more dependent on the o/s that your server is running.
best.
Since I can't test on a 1.57 install, try this
I don't get a debug on 1.58/2 but it goes back to the main CEON screen, not sure if it should do that or not....Code:$fallback_defines = [
'product_reviews' => $default_uri_parts[$default_language_code]['product_reviews'] ?? ($default_uri_parts['en']['product_reviews'] ?? 'Reviews'),
'product_reviews_info' => $default_uri_parts[$default_language_code]['product_reviews_info'] ?? ($default_uri_parts['en']['product_reviews_info'] ?? 'Review'),
'product_reviews_write' => $default_uri_parts[$default_language_code]['product_reviews_write'] ?? ($default_uri_parts['en']['product_reviews_write'] ?? 'Write a Review'),
'tell_a_friend' => $default_uri_parts[$default_language_code]['tell_a_friend'] ?? ($default_uri_parts['en']['tell_a_friend'] ?? 'Tell a Friend'),
'ask_a_question' => $default_uri_parts[$default_language_code]['ask_a_question'] ?? ($default_uri_parts['en']['ask_a_question'] ?? 'Ask a Question')
];
Steve It worked flawlessly , I just removed the whole section and added what you posted and now it passes all test. Thank you so much . I am so sorry I am only just now getting back to you. I had to put my test on hold till now. but this was my last stumbling block to upgrading.
Just wanted to add , this was with my test site using php 8.1 and zencart 1.5.8. No error logs or anything. Everything works great.
Hi All,
I am running the latest version of zencart and the latest version of php 8.1. I have the paid version of ceon uri maping manager which I downloaded and installed to my test site. It also includes Ceon uri Mapping (SEO) Config which appears to be working ok.
This is the message that I am getting: This software cannot work without the latest version of Ceon URI Mapping: UMM Edition having already been installed. Please upgrade from the installed version of Ceon URI Mapping (Standard Edition 5.1.0) to Ceon URI Mapping: UMM Edition.
It is showing that I have installed version 5.1.0 according to the site I have installed it on.
The version that I have for Mappings Manager is 2.1.0 which I thought is correct because I downloaded from the ceon site.
After running a test I got this one message:
A file has had a modification made to it, for an older version of Ceon URI Mapping, but this modification is no longer needed.
The path to the file is /home/xxxxx/public_html/includes/extra_datafiles/ceon_uri_mapping_sessions_define.php
Although the file had to be modified for a previous version of the module, this version works differently and the file is not modified for this version.
Remove the modification from the file by editing the file and removing the block beginning with // BEGIN CEON URI MAPPING 1 of 1 and ending with // END CEON URI MAPPING 1 of 1 - including those two “marker comments”.
Alternatively, if the file was modified only for Ceon URI Mapping and not for any other module, back up the file (e.g. copy it to your local computer) and replace it with a “fresh” version of the file from a “fresh” set of Zen Cart files.
Any help would be appreciated
This is what is in the file:
* @copyright Portions Copyright 2003 osCommerce
* @link http://ceon.net/software/business/zen-cart/uri-mapping
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: ceon_uri_mapping_sessions_define.php 1027 2019-05-10 for conor: Ceon Support added v5.0.0$
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
// Used to force the path for sessions to be at the root.
// Though this has been moved to init_ceon_uri_mapping_sessions.php to support
// loading if active and skipping if inactive.
// Static URIs are relative to the site's root, so cookie should be set for the root
// This removes the need to override the file includes/init_includes/init_sessions.php and means
// that the file includes/init_includes/overrides/init_sessions.php is not necessary.
// Override removal is applicable to the file structure used by ZC 1.3.9c and more recent.
// This is used with consideration that it is the only such use of CUSTOM_COOKIE_PATH.
// If another application defines CUSTOM_COOKIE_PATH to something else before the below define
// then this define will be of no value.
//define('CUSTOM_COOKIE_PATH', '/');
No reply as yet but then we have email issues at present.
Ceon.net have kindly released a new version of Ceon URI Mapping compatible with ZC v1.5.8
Version 5.1.1 was released on 4 Jan 2024
https://ceon.net
Do I have to pay again because the emails that you sent me were confusing.
One said to download from the invoice and the other required invoice information which was sent and I have not received a return email since.
Please confirm the correct information download from my invoice, or do I have to Pay again?
My post was simply a heads up to the ZC community that an update of Ceon URI Mapping was available outside of this support site, the stand alone (free) version, which this thread is regarding.
I have no idea about the commercial Ceon URI Mapping: UMM Edition - as mentioned in your previous posts.
From what I've gathered if the new release has the same primary version (5.xxx) then the update is part of the original download/agreement.
I would think to try downloading from whatever account was used and verify that it contains new files.. Not sure why being asked about the invoice number would mandate additional transactions.
I mean, to be blatantly cheeky, if asked how tall you were would that mean you need to change the sole thickness of whatever shoes you may be wearing?
FYI: If you previously purchased the Mapping Manager from Ceon, that is also updated (11/01/2024: UMM 2.2 and URI Mapping 5.1.1 are in the same .zip download), which you can download from the original order details in your account.
I don't understand why there was no announcement here nor any email notification.
I've just done merging the two with my dev site and personal fixes, what a pain in the arse. I see the majority of issues have been addressed (without communication to the effect) but this plugin should have a single Ceon-managed public Github to centralise issues. There are various public and private Githubs which are not the way to manage this complex pile of files.
The sooner this functionality is in core the better.
As I've already found bugs, I've re-started a previous repository for URI Mapping:
https://github.com/torvista/Zen-Cart_CEON-URI-Mapping
I've restructured the files to make it easier for comparisons.
Feel free to report Issues there.
So, I have a new version of a product, and I want urls pointing to the old version of the product to redirect 301 to the new product.
How should I do that, bearing in mind old urls out there in the wild are friendly style?
Just a RewriteRule / nothing to be done in Ceon Uri?
So want the old URI to direct to a new product and want the new product designation to also point to the new product? And don't want to allow access to the old product itself?
Seems like could expire the current uri of the old product (within admin delete the uri from the product), then create a static alias for another static URI (configuration section of instructions section 11) so that the old URI points to the new URI using the redirect code of choice: 301, 302, 303 or 307.
Or could bypass that database record and enter information in the .htaccess to redirect away. Whatever works for you, I would think the database option would be better so that it would remain with the store as the store moved and it simplifies the .htaccess file and maintenance.
Thanks for that.
I tried manually adding the entry to the mappings table as described but it did not work...and as the table has no unique column it's hard to debug further with phpmyadmin, so maybe my error.
I'd already spent an inordinate amount of time trying to get htaccess rules to work, due to a couple of gotchas (something to be added to ZC documentation). But working now, and better for me as it's in plain view.
Update on this plugin: the Github repo button on the plugin library page has been pointed to https://github.com/torvista/Zen-Cart_CEON-URI-Mapping
Thanks to @torvista for his support of this plugin.
v1.5.7b CEON v5.1.0
I have this error being thrown every 4 minutes or so for hundreds of products so these are examples of a much repeated error log with the variations being the product uri and filename affected (as per the types in the .php) - I have checked the file /includes/extra_datafiles/ceon_uri_mapping_product_pages.php and it seems to be OK, matches my file copy of the v5.1.0 download but not sure if there have been any subsequent mods to the file since downloading (same file exists in the v5.0.0 version) - am stumped as to what the issue may be and would really appreciate some assistance.
cheers, Mike
copy of my installed /includes/extra_datafiles/ceon_uri_mapping_product_pages.phpCode:[24-Mar-2024 13:14:42 Australia/Sydney] Request URI: /sterling-silver-clip-on-earrings/clip-on-earrings-unique-artisan-crafted-in-sterling-silver/review?reviews_id=19, IP address: 47.128.117.243
#1 include(/includes/extra_datafiles/ceon_uri_mapping_product_pages.php) called at [/includes/init_includes/init_file_db_names.php:80]
#2 require(/includes/init_includes/init_file_db_names.php) called at [/includes/application_top.php:185]
#3 require(/includes/application_top.php) called at [/index.php:25]
--> PHP Warning: Use of undefined constant FILENAME_DOCUMENT_GENERAL_INFO - assumed 'FILENAME_DOCUMENT_GENERAL_INFO' (this will throw an Error in a future version of PHP) in /includes/extra_datafiles/ceon_uri_mapping_product_pages.php on line 24.
[24-Mar-2024 13:14:42 Australia/Sydney] Request URI: /sterling-silver-clip-on-earrings/clip-on-earrings-unique-artisan-crafted-in-sterling-silver/review?reviews_id=19, IP address: 47.128.117.243
#1 include(/includes/extra_datafiles/ceon_uri_mapping_product_pages.php) called at [/includes/init_includes/init_file_db_names.php:80]
#2 require(/includes/init_includes/init_file_db_names.php) called at [/includes/application_top.php:185]
#3 require(/includes/application_top.php) called at [/index.php:25]
--> PHP Warning: Use of undefined constant FILENAME_DOCUMENT_PRODUCT_INFO - assumed 'FILENAME_DOCUMENT_PRODUCT_INFO' (this will throw an Error in a future version of PHP) in /includes/extra_datafiles/ceon_uri_mapping_product_pages.php on line 25.
Code:<?php
/**
* Ceon URI Mapping Product Page Definitions.
*
* Contains arrays with the list of the product pages and product related pages this store uses.
*
* @package ceon_uri_mapping
* @author Conor Kerr <[email protected]>
* @copyright Copyright 2008-2019 Ceon
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @link http://ceon.net/software/business/zen-cart/uri-mapping
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: ceon_uri_mapping_product_pages.php 1027 2012-07-17 20:31:10Z conor $
*/
/**
* If the store has any custom product page types, add their info page definitions to the list.
*/
if (empty($ceon_uri_mapping_product_pages)) $ceon_uri_mapping_product_pages = array();
$ceon_uri_mapping_product_pages = array_merge(array(
FILENAME_DOCUMENT_GENERAL_INFO,
FILENAME_DOCUMENT_PRODUCT_INFO,
FILENAME_PRODUCT_INFO,
FILENAME_PRODUCT_BOOK_INFO,
FILENAME_PRODUCT_FREE_SHIPPING_INFO,
FILENAME_PRODUCT_MUSIC_INFO
), $ceon_uri_mapping_product_pages);
if (empty($ceon_uri_mapping_product_related_pages)) $ceon_uri_mapping_product_related_pages = array();
$ceon_uri_mapping_product_related_pages = array_merge(array(
FILENAME_PRODUCT_REVIEWS,
FILENAME_PRODUCT_REVIEWS_INFO,
FILENAME_PRODUCT_REVIEWS_WRITE
), $ceon_uri_mapping_product_related_pages);
if (defined('FILENAME_TELL_A_FRIEND')) {
$ceon_uri_mapping_product_related_pages[] = FILENAME_TELL_A_FRIEND;
}
if (defined('FILENAME_ASK_A_QUESTION')) {
$ceon_uri_mapping_product_related_pages[] = FILENAME_ASK_A_QUESTION;
}
Do you have the file includes/extra_datafiles/ceon_uri_mapping_database_tables.php in place? That file contains the definition that appears to be missing. It appears though that because the file handlers that process the associated directories don't use the glob function that perhaps sorting is not accomplished and therefore the file reporting the issue is loaded before the file desired to be loaded earlier.
Unfortunate, but that's the design chosen to perform the Laravel file loading. Looks like some additional unnecessary logic would need to be incorporated if you're answer to the above is that the file is present. If the file is not present, then wonder what other files are missing, which I would have thought would be identified in the installation check or whatever it is that reports extra files and potentially missing files.
Hi MC - the file includes/extra_datafiles/ceon_uri_mapping_database_tables.php is in place and I have checked installed files against the downloaded fileset copy and all files are correct. The issue only started 3 days ago on two sites with CEON 5.1.0 installed - prior to this there were no error logs - 3 days ago I did change the PHP version from 7.1 to 7.4
So after everything else checked out I reverted to PHP 7.1 and that did the trick, the errors ceased.
Now I need to find out why changing php would create the issue and imporatantly how to fix it.
Reason for PHP change - I have one hosting account with 3 active sites 2 had been upgraded to 157 a couple of years ago but one was still a v155f and I had to use code in the .htaccess to have the server assume 7.1 to get it to work, until I upgraded it in the last few days to v157 - hence now I could change PHP to the higher 7.4 as all sites were now v157.
So in respect to your query about the file includes/extra_datafiles/ceon_uri_mapping_database_tables.php infering a possible database issue - it seems to me that installation of CEON is relative to the server PHP version at time of installation.
Q - So how can I get CEON to accept the PHP change?? (aside from an uninstall and then new install if possible to avoid it)
I couldn't find anything in the CEON documentation specifically, other than this in the 157 installation;
I changed PHP back from 7.1 to 7.4 and followed the above in the hope it would detect the change but it did not.HTML Code:Automatically update the database and configuration
This software comes with some intelligent upgrade and error checking functionality which makes it easy to keep the database and configuration up to date.
Go to Modules > Ceon URI Mapping (SEO) Config in the Zen Cart Admin and the module will be updated automagically!
cheers, Mike
Not sure if it is a bug, a wrong setting on my hands or normal but i am getting the following "issue":
the plug-in works as intended:
http://www.abc.com/index.php?main_pa...oducts_id=2807
becomes
www.abc.com/awesome-product
However if the product is accessed thru a linked category ( same product in multiple categories) , it shows
www.abc.com/awesome-product?cPath=25&
a ?cPath= is being added to the end of the url.
Is this normal behavior?
How can I stop this from happening?
Thank you
Normal behavior. The base name represents the master category, the added cPath parameter identified and supports processing that the product is linked. Take note of the html source code to see that both have the same canonical link.
Tongue-in-cheek, to stop having that additional parameter could stop linking product alternatively could code the parameter away, but then what good would linking the product do other than supporting sale pricing configuration?
Another way of is that the additional parameter gives the little bit of information necessary to show the product in the desired hierarchy.
Thank you MC for clearing this out.
I assumed it was normal behavior but needed confirmation.
I am having issues with category specific stylesheet and thoughts it could have been the culprit.
When the cpath ( from linked category) is added, the category specific stylesheet is not loaded for some unknown reasons.
Does anyone knows if Ceon URI is compatible with ZC 2.0.1?
Thank you
At what point in time (and, more importantly, why) did the .htaccess addition for the Ceon URI Mappings become so complex?
I recently upgraded a site from zc155f and this is the only addition to that file ... and it works just fine:
Code:<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [QSA,L]
</IfModule>
I don't remember it ever being any simpler than a huge list.
Same, as far as I've always known it's been a copy and paste operation that works just fine as well.
Me personally? The above appears to involve more server effort than filtering down the content list. The above offered code compares each web request against the file system, if it is a file or a directory then it is directly accessed, if it is not then ZC processes the request.
Seems to me a further means to easily be malicious as there is no preset/expected structure and if somehow a file is maliciously written then creating a folder structure off of the root similar to a product's URL would allow "replacing" the page's content with an applicable file and barely notice the issue.
Besides as I recall, the on-screen instructions indicate that there are other ways or perhaps changes necessary to obtain the necessary results. For example, I usually have to modify the line of the generated RewriteRule on the server I use currently. Either it is because of the server or the way I use the program, I'm not sure, but the modification is simple (Either I have to remove or add a leading forward slash.)
Does it work on 2.0.1?
Doesn't seem to work with new installs. At a minimum, the responsive_classic customization for html_header.php would need to change because of changes to MobileDetect. But I still can't get it to rewrite URLs on a new install using responsive_classic.
>But I still can't get it to rewrite URLs on a new install using responsive_classic.
Me neither!
I've always managed to avoid digging into the infernal internals, since it wasn't broken...on a cursory look last night I saw how the observer pulled static links out of the db for the various pages but didn't see the mechanism for generating a new link/storing it in the db when one did not exist, so that's a starting point.
No chance to do that today.
When I looked at it quickly, it appeared that the NOTIFY_SEFU_INTERCEPT observer wasn't being hit, which it consistent with your finding. Haven't had time to dig in yet.
The observer was working correctly to pull links from the db....which was empty...and I didn't see any code to handle "if empty")...because there isn't any!
As I've always used UMM, and never read the instructions, I'd not realised that:
So, once you edit a product and generate the static url...it works as advertised.Quote:
This module DOES NOT automatically add mappings for EXISTING Categories/Products/Manufacturers/EZ-Pages!
If the site has existing Categories/Products/Manufacturers/EZ-Pages, they'll continue to use the standard Zen Cart dynamic URIs, until a URI has been entered or auto-generated for them, by editing the respective Category/Product/Manufacturer/EZ-Page in the admin.
This means going in and editing every Category/Product/Manufacturer/EZ-Page for which a static URI mapping is desired.
...
Our URI Mappings Manager software has the ability to auto-generate URI mappings for all/selected Categories/Products/Manufacturers/EZ-Pages/Other Zen Cart Pages at once.
Back to work.
I did not realize that either - all the sites I manage that use this have used it forever so their list of URLs is fully populated. Thanks for tracking this down.
How do you fix an URL that redirect to the wrong EZ-Page?
The ez-page also a correct uri pointing to it ( the one displayed in ezpage admin) so changing the ez-page id would work.
For example:
url abc.com/flowers points to ez page id 1 ( correct as per admin options)
url abc.com/roost points to ez page id 1 ( wrong and no way to delete the url or change the ez page id)
I looked into phpmyadmin but i am not able to edit the associated_id in the ceon_uri_mappings table
It states:
Any way around this? how can i delete the url in question?Quote:
Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available
Thank you
Can you not search on uri like roost?
Or you could export-edit-import the table.
I run SQL queries from within phpmyadmin whenever I want to edit the 'ceon_uri_mappings' table, backup your database and run this query:
(replace ??? with the new id for /roost)Code:UPDATE ceon_uri_mappings SET associated_db_id=REPLACE(associated_db_id,'1','???') WHERE uri='/roost' AND main_page='page';
or you could delete the whole line using an appropriate DELETE query (that's not Zen Cart related so you might need to do a bit of research)
thank you
zen version 2.01 fresh install everything was working
installed:
zen version 2.01
IH5
Ceon 5.11
Admin says it is up to date and coughed up the info to enter into the root .htaccess file.
I entered the info and now get the white page of nothingness
Log says
in the code for the htaccess page admin said everything was fineCode:[20-Sep-2024 15:47:41 UTC] Request URI: /market/index.php?main_page=product_info&products_id=1, IP address: 172.103.65.146, Language id 1
#0 /home/fantasies/public_html/market/includes/classes/category_tree.php(127): zen_debug_error_handler()
#1 /home/fantasies/public_html/market/includes/modules/sideboxes/categories.php(18): category_tree->zen_category_tree()
#2 /home/fantasies/public_html/market/includes/modules/column_left.php(30): include('/home/fantasies...')
#3 /home/fantasies/public_html/market/includes/templates/responsive_classic/common/tpl_main_page.php(142): require('/home/fantasies...')
#4 /home/fantasies/public_html/market/index.php(94): require('/home/fantasies...')
--> PHP Warning: Undefined array key "categories_image" in /home/fantasies/public_html/market/includes/classes/category_tree.php on line 127.
[20-Sep-2024 15:47:41 UTC] Request URI: /market/index.php?main_page=product_info&products_id=1, IP address: 172.103.65.146, Language id 1
#0 /home/fantasies/public_html/market/includes/classes/category_tree.php(153): zen_debug_error_handler()
#1 /home/fantasies/public_html/market/includes/modules/sideboxes/categories.php(18): category_tree->zen_category_tree()
#2 /home/fantasies/public_html/market/includes/modules/column_left.php(30): include('/home/fantasies...')
#3 /home/fantasies/public_html/market/includes/templates/responsive_classic/common/tpl_main_page.php(142): require('/home/fantasies...')
#4 /home/fantasies/public_html/market/index.php(94): require('/home/fantasies...')
--> PHP Warning: Undefined variable $first_element in /home/fantasies/public_html/market/includes/classes/category_tree.php on line 153.
[20-Sep-2024 15:47:41 UTC] Request URI: /market/index.php?main_page=product_info&products_id=1, IP address: 172.103.65.146, Language id 1
#0 /home/fantasies/public_html/market/includes/classes/category_tree.php(161): zen_debug_error_handler()
#1 /home/fantasies/public_html/market/includes/classes/category_tree.php(153): category_tree->zen_show_category()
#2 /home/fantasies/public_html/market/includes/modules/sideboxes/categories.php(18): category_tree->zen_category_tree()
#3 /home/fantasies/public_html/market/includes/modules/column_left.php(30): include('/home/fantasies...')
#4 /home/fantasies/public_html/market/includes/templates/responsive_classic/common/tpl_main_page.php(142): require('/home/fantasies...')
#5 /home/fantasies/public_html/market/index.php(94): require('/home/fantasies...')
--> PHP Warning: Undefined array key "" in /home/fantasies/public_html/market/includes/classes/category_tree.php on line 161.
[20-Sep-2024 15:47:41 UTC] Request URI: /market/index.php?main_page=product_info&products_id=1, IP address: 172.103.65.146, Language id 1
#0 /home/fantasies/public_html/market/includes/classes/category_tree.php(161): zen_debug_error_handler()
#1 /home/fantasies/public_html/market/includes/classes/category_tree.php(153): category_tree->zen_show_category()
#2 /home/fantasies/public_html/market/includes/modules/sideboxes/categories.php(18): category_tree->zen_category_tree()
#3 /home/fantasies/public_html/market/includes/modules/column_left.php(30): include('/home/fantasies...')
#4 /home/fantasies/public_html/market/includes/templates/responsive_classic/common/tpl_main_page.php(142): require('/home/fantasies...')
#5 /home/fantasies/public_html/market/index.php(94): require('/home/fantasies...')
--> PHP Warning: Trying to access array offset on null in /home/fantasies/public_html/market/includes/classes/category_tree.php on line 161.
[20-Sep-2024 15:47:41 UTC] Request URI: /market/index.php?main_page=product_info&products_id=1, IP address: 172.103.65.146, Language id 1
#0 /home/fantasies/public_html/market/includes/classes/category_tree.php(168): zen_debug_error_handler()
#1 /home/fantasies/public_html/market/includes/classes/category_tree.php(153): category_tree->zen_show_category()
#2 /home/fantasies/public_html/market/includes/modules/sideboxes/categories.php(18): category_tree->zen_category_tree()
#3 /home/fantasies/public_html/market/includes/modules/column_left.php(30): include('/home/fantasies...')
#4 /home/fantasies/public_html/market/includes/templates/responsive_classic/common/tpl_main_page.php(142): require('/home/fantasies...')
#5 /home/fantasies/public_html/market/index.php(94): require('/home/fantasies...')
--> PHP Warning: Undefined array key "" in /home/fantasies/public_html/market/includes/classes/category_tree.php on line 168.
[20-Sep-2024 15:47:41 UTC] Request URI: /market/index.php?main_page=product_info&products_id=1, IP address: 172.103.65.146, Language id 1
#0 /home/fantasies/public_html/market/includes/classes/category_tree.php(168): zen_debug_error_handler()
#1 /home/fantasies/public_html/market/includes/classes/category_tree.php(153): category_tree->zen_show_category()
#2 /home/fantasies/public_html/market/includes/modules/sideboxes/categories.php(18): category_tree->zen_category_tree()
#3 /home/fantasies/public_html/market/includes/modules/column_left.php(30): include('/home/fantasies...')
#4 /home/fantasies/public_html/market/includes/templates/responsive_classic/common/tpl_main_page.php(142): require('/home/fantasies...')
#5 /home/fantasies/public_html/market/index.php(94): require('/home/fantasies...')
--> PHP Warning: Trying to access array offset on null in /home/fantasies/public_html/market/includes/classes/category_tree.php on line 168.
[20-Sep-2024 15:47:41 UTC] Request URI: /market/index.php?main_page=product_info&products_id=1, IP address: 172.103.65.146, Language id 1
#0 /home/fantasies/public_html/market/includes/classes/category_tree.php(173): zen_debug_error_handler()
#1 /home/fantasies/public_html/market/includes/classes/category_tree.php(153): category_tree->zen_show_category()
#2 /home/fantasies/public_html/market/includes/modules/sideboxes/categories.php(18): category_tree->zen_category_tree()
#3 /home/fantasies/public_html/market/includes/modules/column_left.php(30): include('/home/fantasies...')
#4 /home/fantasies/public_html/market/includes/templates/responsive_classic/common/tpl_main_page.php(142): require('/home/fantasies...')
#5 /home/fantasies/public_html/market/index.php(94): require('/home/fantasies...')
--> PHP Warning: Undefined array key "" in /home/fantasies/public_html/market/includes/classes/category_tree.php on line 173.
[20-Sep-2024 15:47:41 UTC] Request URI: /market/index.php?main_page=product_info&products_id=1, IP address: 172.103.65.146, Language id 1
#0 /home/fantasies/public_html/market/includes/classes/category_tree.php(173): zen_debug_error_handler()
#1 /home/fantasies/public_html/market/includes/classes/category_tree.php(153): category_tree->zen_show_category()
#2 /home/fantasies/public_html/market/includes/modules/sideboxes/categories.php(18): category_tree->zen_category_tree()
#3 /home/fantasies/public_html/market/includes/modules/column_left.php(30): include('/home/fantasies...')
#4 /home/fantasies/public_html/market/includes/templates/responsive_classic/common/tpl_main_page.php(142): require('/home/fantasies...')
#5 /home/fantasies/public_html/market/index.php(94): require('/home/fantasies...')
--> PHP Warning: Trying to access array offset on null in /home/fantasies/public_html/market/includes/classes/category_tree.php on line 173.
[20-Sep-2024 15:47:41 UTC] Request URI: /market/index.php?main_page=product_info&products_id=1, IP address: 172.103.65.146, Language id 1
#0 /home/fantasies/public_html/market/includes/classes/category_tree.php(185): zen_debug_error_handler()
#1 /home/fantasies/public_html/market/includes/classes/category_tree.php(153): category_tree->zen_show_category()
#2 /home/fantasies/public_html/market/includes/modules/sideboxes/categories.php(18): category_tree->zen_category_tree()
#3 /home/fantasies/public_html/market/includes/modules/column_left.php(30): include('/home/fantasies...')
#4 /home/fantasies/public_html/market/includes/templates/responsive_classic/common/tpl_main_page.php(142): require('/home/fantasies...')
#5 /home/fantasies/public_html/market/index.php(94): require('/home/fantasies...')
--> PHP Warning: Undefined array key "" in /home/fantasies/public_html/market/includes/classes/category_tree.php on line 185.
[20-Sep-2024 15:47:41 UTC] Request URI: /market/index.php?main_page=product_info&products_id=1, IP address: 172.103.65.146, Language id 1
#0 /home/fantasies/public_html/market/includes/classes/category_tree.php(185): zen_debug_error_handler()
#1 /home/fantasies/public_html/market/includes/classes/category_tree.php(153): category_tree->zen_show_category()
#2 /home/fantasies/public_html/market/includes/modules/sideboxes/categories.php(18): category_tree->zen_category_tree()
#3 /home/fantasies/public_html/market/includes/modules/column_left.php(30): include('/home/fantasies...')
#4 /home/fantasies/public_html/market/includes/templates/responsive_classic/common/tpl_main_page.php(142): require('/home/fantasies...')
#5 /home/fantasies/public_html/market/index.php(94): require('/home/fantasies...')
--> PHP Warning: Trying to access array offset on null in /home/fantasies/public_html/market/includes/classes/category_tree.php on line 185.
[20-Sep-2024 15:47:41 UTC] Request URI: /market/index.php?main_page=product_info&products_id=1, IP address: 172.103.65.146, Language id 1
#0 /home/fantasies/public_html/market/includes/classes/category_tree.php(188): zen_debug_error_handler()
#1 /home/fantasies/public_html/market/includes/classes/category_tree.php(153): category_tree->zen_show_category()
#2 /home/fantasies/public_html/market/includes/modules/sideboxes/categories.php(18): category_tree->zen_category_tree()
#3 /home/fantasies/public_html/market/includes/modules/column_left.php(30): include('/home/fantasies...')
#4 /home/fantasies/public_html/market/includes/templates/responsive_classic/common/tpl_main_page.php(142): require('/home/fantasies...')
#5 /home/fantasies/public_html/market/index.php(94): require('/home/fantasies...')
--> PHP Warning: Undefined array key "" in /home/fantasies/public_html/market/includes/classes/category_tree.php on line 188.
[20-Sep-2024 15:47:41 UTC] Request URI: /market/index.php?main_page=product_info&products_id=1, IP address: 172.103.65.146, Language id 1
#0 /home/fantasies/public_html/market/includes/classes/category_tree.php(188): zen_debug_error_handler()
#1 /home/fantasies/public_html/market/includes/classes/category_tree.php(153): category_tree->zen_show_category()
#2 /home/fantasies/public_html/market/includes/modules/sideboxes/categories.php(18): category_tree->zen_category_tree()
#3 /home/fantasies/public_html/market/includes/modules/column_left.php(30): include('/home/fantasies...')
#4 /home/fantasies/public_html/market/includes/templates/responsive_classic/common/tpl_main_page.php(142): require('/home/fantasies...')
#5 /home/fantasies/public_html/market/index.php(94): require('/home/fantasies...')
--> PHP Warning: Trying to access array offset on null in /home/fantasies/public_html/market/includes/classes/category_tree.php on line 188.
[20-Sep-2024 15:47:41 UTC] Request URI: /market/index.php?main_page=product_info&products_id=1, IP address: 172.103.65.146, Language id 1
#0 /home/fantasies/public_html/market/includes/classes/category_tree.php(205): zen_debug_error_handler()
#1 /home/fantasies/public_html/market/includes/classes/category_tree.php(153): category_tree->zen_show_category()
#2 /home/fantasies/public_html/market/includes/modules/sideboxes/categories.php(18): category_tree->zen_category_tree()
#3 /home/fantasies/public_html/market/includes/modules/column_left.php(30): include('/home/fantasies...')
#4 /home/fantasies/public_html/market/includes/templates/responsive_classic/common/tpl_main_page.php(142): require('/home/fantasies...')
#5 /home/fantasies/public_html/market/index.php(94): require('/home/fantasies...')
--> PHP Warning: Undefined array key "" in /home/fantasies/public_html/market/includes/classes/category_tree.php on line 205.
[20-Sep-2024 15:47:41 UTC] Request URI: /market/index.php?main_page=product_info&products_id=1, IP address: 172.103.65.146, Language id 1
#0 /home/fantasies/public_html/market/includes/classes/category_tree.php(205): zen_debug_error_handler()
#1 /home/fantasies/public_html/market/includes/classes/category_tree.php(153): category_tree->zen_show_category()
#2 /home/fantasies/public_html/market/includes/modules/sideboxes/categories.php(18): category_tree->zen_category_tree()
#3 /home/fantasies/public_html/market/includes/modules/column_left.php(30): include('/home/fantasies...')
#4 /home/fantasies/public_html/market/includes/templates/responsive_classic/common/tpl_main_page.php(142): require('/home/fantasies...')
#5 /home/fantasies/public_html/market/index.php(94): require('/home/fantasies...')
--> PHP Warning: Trying to access array offset on null in /home/fantasies/public_html/market/includes/classes/category_tree.php on line 205.
The line above in red...should I remove that file or is there an edit it needs.
I suggest you use updated files for starters:
https://github.com/torvista/Zen-Cart_CEON-URI-Mapping
probably nothing to do with your error, but FYI.
I am upgrading from Zen Cart 1.5.5f to 2.1.0.
I used Ceon-URL-Mapping with 1.5.5f, I upgraded the database and i am using it with my testing 2.1.0,
I do not need to install the tables for Ceon-URL-Mapping, do i?
if not how do i skip the tables creation? Thanks.
If you upgraded, the tables should still be there. An upgrade does not wipe anything, a clean install does...but even so, it probably would not wipe tables that are not ZC core.
The installer is automatic....if the tables are already installed, it's already done...why and how are you thinking of repeating the install?
Ah, so you mean you have not yet copied the URI mapping files into the ZC210 fileset.
Well, take a backup of the db before you do so, but it should not run the URI installer again.
Use the latest files on my Github.
Hi,
I'm having the same issue as shags38 in post #332.
ZC Version 2.0.1
Ceon Version 5.1.1
PHP Version (as recently changed by our host): 8.2
[27-Jan-2025 21:48:11 UTC] PHP Fatal error: Uncaught Error: Undefined constant "FILENAME_DOCUMENT_GENERAL_INFO" in /home/zcammell8139nz/public_html/includes/extra_datafiles/ceon_uri_mapping_product_pages.php:24
Stack trace:
#0 /home/****/public_html/includes/init_includes/init_file_db_names.php(54): include()
#1 /home/****/public_html/includes/application_top.php(214): require('/home/zcammell8...')
#2 /home/****/public_html/index.php(25): require('/home/zcammell8...')
#3 {main}
thrown in /home/****/public_html/includes/extra_datafiles/ceon_uri_mapping_product_pages.php on line 24
I've reverted to PHP 8.0 as a temporary solution and it appears to work. Is there a long-term solution to this issue on the cards?
Further to the above, changing to PHP 8.0 was only temporary and for some reason only worked for about an hour before the error was thrown again.
I've also reuploaded all the files and that works temporarily as well, and then the error comes back and the website goes down.
I have Ceon URI Mapping 5.1.0 (I think) and, searching for FILENAME_DOCUMENT_GENERAL_INFO, I see that as my init_file_db_names.php runs its last few lines it's iterating $directory_array and executing each file, for me these two are executed in this order:
The file ceon_uri_mapping_filenames.php defines the constant you're seeing an error for:Code:includes/extra_datafiles/ceon_uri_mapping_filenames.php
includes/extra_datafiles/ceon_uri_mapping_product_pages.php
In your case, from your stack trace, init_file_db_names.php seems to be executing ceon_uri_mapping_product_pages.php but the constant is not defined at that time.Code:if (!defined('FILENAME_DOCUMENT_GENERAL_INFO')) {
define('FILENAME_DOCUMENT_GENERAL_INFO', 'document_general_info');
}
Do you have ceon_uri_mapping_filenames.php on your system, and does it define the constant correctly? If you can't use a debugger (I use VS Code for local development) you may want to put echo statements or similar in various files to check what order they're being loaded.
In addition to the above, as far as I know prior to PHP 8.0 use of an undefined constant would generate a Warning level error, and from 8.0 onward it generates a Fatal level error. So, I doubt that changing to PHP 8.0 would have fixed the problem you described, it should still have generated a Fatal error (and brought the website down, since these files are executed for every page load). Maybe your admin side would have worked, but not the customer facing catalog side, as there is a separate YOUR_ADMIN/includes/extra_datafiles/ceon_uri_mapping_filenames.php file that defines the constant that you may have but are missing the catalog side equivalent .
Thanks neekfenwick for your feedback.
ceon_uri_mapping_filenames.php is in the correct place and the constant is defined as:
if (!defined('FILENAME_DOCUMENT_GENERAL_INFO')) {
define('FILENAME_DOCUMENT_GENERAL_INFO', 'document_general_info');
I've since found that the file ceon_uri_mapping_database_tables.php is being deleted after approximately 25mins and this is causing the error - I'm unsure if this is how the modules is supposed to function or if something has gone wrong.
That sounds pretty crazy :) Also, you don't say if it's the catalog or admin version of that file, and that file doesn't seem to define anything that would cause the stack trace you reported, it may not be the only file going missing. Maybe your host has some kind of antivirus software that is flagging the file as malicious? If you have access to your server's logs you might try searching for any mention of ceon_uri_mapping_database_tables to see if any software is logging about it, for example `find /var/log -type f | xargs grep ceon_uri_mapping_database_tables` .. it'll be very dependent on what access you have to your server and what software is on it.
Use an updated version from my GitHub.
Hi,
Thanks for the help.
I typed in the wrong file name in my last post, the file that goes missing is indeed ceon_uri_mapping_filenames.php.
I am using the latest files from Github.
It could be that the issue is caused by my host, I am awaiting a response from them as I don't have access to the server logs.
Hi,
I've found the source of the problem, the anti-virus software on our host's server was treating ceon_uri_mapping_filenames.php as malware.
If anyone else runs into this issue this may be the cause of your problem as well.
Thanks again for the help.
after installing 2.1.0 with clean install I now just need to add the table info to the database . I have reinstalled the 2.1.0 store with CKeditor 5 and IH5 mod too but the ceon uri 5 nor 5.11 will install. They worked on 2.0.1 but now say they do not work on this version.
Ideas please.
If you are using the updated version from my Github, please detail the problem in an issue there.
ok, I will reinstall it again and see if it behaves. I wanted to get it installed prior to uploading the tables to the new database. give me a bit, trying not to freeze in this very not so usual Kansas cold
UMM users send me a pm.
I was wondering why the links to the CEON URI has changed from /market/vendor/forbiddenwhispers/ to /market/en/vendor/forbiddenwhispers/
I have the little box ticked so it wil auto generate it but if I take off the tick it says no auto uri generated. I was doing this earlier and it worked as is but not now when I returned to adding the products.
should I redo the Ceon URI Mapping (SEO) Config again?
The addition of the language (en/) is part of the setup options. The checkmark to auto generate will generate based on whatever rule or settings are in place. For those product that include the language but you don't want it there, go back to the product, remove the en/ and save the product.
To prevent the addition of the language identifier go back to the settings to remove the addition of the language to the URL.
Note to you and others, changing the web address reference for the product or whatever was given the address will allow the previous and now current addresses to still function to get to the item.
The only real issue would be if you wanted to use/reuse that link address to get to something else.
Glad you figured out that the setting was CEON related.
there should be a warning that your version is not compatible with PHP7.4 anymoreQuote:
[18-Apr-2025 12:30:44 Europe/Berlin] PHP Parse error: syntax error, unexpected '|', expecting ';' or '{' in /admin/includes/classes/class.CeonURIMappingAdminProductPages.php on line 1111
[18-Apr-2025 12:30:44 Europe/Berlin] Request URI: /admin/index.php?cmd=product&cPath=11_13_18_23&product_type=1&pID=17&action=new_product , IP address: censored
--> PHP Parse error: syntax error, unexpected '|', expecting ';' or '{' in /admin/includes/classes/class.CeonURIMappingAdminProductPages.php on line 1111.
[18-Apr-2025 11:50:51 Europe/Berlin] PHP Fatal error: Cannot use 'null' as class name as it is reserved in /admin/includes/classes/observers/class.CeonURIMappingAdminCopyObserver.php on line 89
php 7.4 went obsolete in 2022. It's 2025.
php moves the goalposts and code has to be updated accordingly.
If you insist on php 7 you'll need to remove the type hints
e.g.
Quote:
: bool|string
I am aware of the PHP roadmap.
It's just some sort of chicken/egg problem. Zencart needs to be updated, therefore mariadb needs to be upgraded, PHP needs to be upgraded, template needs to be updated.. And... Plugins (/ 3rd party paying module ).
Some say you need to dive directly into the deep with directly installing ZC 2 or 2.1. I do not like that approach. I jump on a rock in-between which is 1.5.7d after I analysed https://docs.zen-cart.com/user/first..._requirements/ . Updating all plugins to at least 1.5.7 standards first. Because Ceon URI Mapping V5.1.1 is not being mentioned @the plugin section I'd just assumed it's 1.5.7 compatible. Due to minor version difference I assumed it was still 1.5.7 compatible.
since you direct everyone to your github, the idea that at the top of your README.md, you have a list of requirements for the latest version is not unreasonable.
if you ever start making use of releases and tags (i only see 1 tag and 0 releases), which i recommend, you can add the requirements for each release there.
i am sure that within the 71 commits you have on your repo, there is a version compatible with 7.4 and zc1.5.7d (maybe not); but had you made use of releases and tags, it would allow users the opportunity to use a version that fits their specific needs.
browbeating a user is so beneath you; unless you decide to start offering a hosting package. in which case, on this forum, it is expected.
best.