Zen Follower
- Join Date:
- Dec 2011
- Posts:
- 287
- Plugin Contributions:
- 0
Ceon URI Mapping V5.0
Works perfectly!
Thanks!
Views: 88,597
Zen Follower
Works perfectly!
Thanks!
Administrator
I've got a site, recently upgraded to zc156c and Ceon 5.0.0. I'm seeing that, for the *product_info *page, if a requested product has an entry in the ceon_uri_mappings::uri field and the associated product exists in the products table ... but the product is disabled that the $_GET['products_id'] value isn't set.
Totally Zenned
lat9:
I've got a site, recently upgraded to zc156c and Ceon 5.0.0. I'm seeing that, for the *product_info *page, if a requested product has an entry in the ceon_uri_mappings::uri field and the associated product exists in the products table ... but the product is disabled that the $_GET['products_id'] value isn't set.
I just tried taking a product that was defined with a URI, added a log of $_GET at the point after the first notifier in includes/modules/pages/product_info/header_php.php navigated to the product, then disabled the product and navigated to it again. In both cases $_GET['products_id'] was shown as set and no errors/notices in the header load.
Assume that the resequence of the load point was applied?
What are the settings associated with missing pages and how to deal with things like that? I mean I had a "sorry page not found" message provided through the ZC main area, but it was expected.
Administrator
mc12345678:
I just tried taking a product that was defined with a URI, added a log of $_GET at the point after the first notifier in includes/modules/pages/product_info/header_php.php navigated to the product, then disabled the product and navigated to it again. In both cases $_GET['products_id'] was shown as set and no errors/notices in the header load.
>> For my case, this was apparently a disabled product when the site was upgraded from zc154/Ceon 4.?? to zc156c/Ceon 5.00. I've had to force $_GET['products_id'] to be 0 if not set.Assume that the resequence of the load point was applied?
>> Yes.What are the settings associated with missing pages and how to deal with things like that? I mean I had a "sorry page not found" message provided through the ZC main area, but it was expected.
>> Missing pages are set to display page-not-found, but what's happening is that the product_info page (with the 'sorry that product could not be found') page is displayed and the zc156c version is having a major hissy-fit due to that missing $_GET['products_id'].
Which of the various class methods are involved in 'decoding' the category-/product-id from a product-specific URI?
Administrator
lat9:
Which of the various class methods are involved in 'decoding' the category-/product-id from a product-specific URI?
Never mind; it's the zc156c /pages/product_info/header_php.php that's unsetting that $_GET['products_id'] (properly decoded by Ceon URI) when the associated product is 'not found'.
Totally Zenned
This is on an upgraded Zen Cart (1.5.5>1.5.6c) and CEON URI (3.6.3>5.0.1)
Seems to work find until I access the config from the admin when I get this error:
--> PHP Fatal error: 1146:Table 'db739574.TABLE_CEON_URI_MAPPING_PRODUCT_RELATED_PAGES_URI_PARTS' doesn't exist ::
SELECT
page_type,
language_code,
uri_part
FROM
TABLE_CEON_URI_MAPPING_PRODUCT_RELATED_PAGES_URI_PARTS
WHERE
1 = 1; ==> (as called by) /....../ADMIN/includes/classes/class.CeonURIMappingConfigUtility.php on line 373 <== in ......./includes/classes/db/mysql/query_factory.php on line 171.
Troubleshooting I see:
the database table does exist: http://prntscr.com/plupe7
is defined correctly in admin/includes/extra_datafiles/ceon_uri_mapping_database_tables.php as define('TABLE_CEON_URI_MAPPING_PRODUCT_RELATED_PAGES_URI_PARTS', DB_PREFIX . 'ceon_uri_mapping_prp_uri_parts');
Why would it thing it doesn't exist?
Totally Zenned
jeking:
This is on an upgraded Zen Cart (1.5.5>1.5.6c) and CEON URI (3.6.3>5.0.1)
Seems to work find until I access the config from the admin when I get this error:
--> PHP Fatal error: 1146:Table 'db739574.TABLE_CEON_URI_MAPPING_PRODUCT_RELATED_PAGES_URI_PARTS' doesn't exist ::
SELECT
page_type,
language_code,
uri_part
FROM
TABLE_CEON_URI_MAPPING_PRODUCT_RELATED_PAGES_URI_PARTS
WHERE
1 = 1; ==> (as called by) /....../ADMIN/includes/classes/class.CeonURIMappingConfigUtility.php on line 373 <== in ......./includes/classes/db/mysql/query_factory.php on line 171.Troubleshooting I see:
the database table does exist: http://prntscr.com/plupe7
is defined correctly in admin/includes/extra_datafiles/ceon_uri_mapping_database_tables.php as define('TABLE_CEON_URI_MAPPING_PRODUCT_RELATED_PAGES_URI_PARTS', DB_PREFIX . 'ceon_uri_mapping_prp_uri_parts');
Why would it thing it doesn't exist?
Looks like if admin/includes/init_includes/init_file_db_names.php did not properly execute as part of includes/application_top.php then that might explain it. Otherwise if the constant were elsewhere defined as itself before getting to the expected file, that would be another "reason". Also, as far as directories, to be sure that the admin/includes/configure.php properly uses relative reference to the current directory instead of a specific path where there might also be an admin directory, but its missing that file but has other(s). Lots of possibilities it seems.
Totally Zenned
Here's what I found. The file ceon_uri_mapping_database_tables.php is in two folders:
/ADMIN/includes/extra_datafiles
/includes/extra_datafiles
The one in the admin folder did not have this define:
define('TABLE_CEON_URI_MAPPING_PRODUCT_RELATED_PAGES_URI_PARTS', DB_PREFIX . 'ceon_uri_mapping_prp_uri_parts');
I checked the 5.0.1 zip from CEON and it's there so I don't know if I mixed something up in the install or if this was a bug from 5.0.0. That's the version installed, not 5.0.1 as I thought.
Totally Zenned
jeking:
Here's what I found. The file ceon_uri_mapping_database_tables.php is in two folders:
/ADMIN/includes/extra_datafiles
/includes/extra_datafilesThe one in the admin folder did not have this define:
define('TABLE_CEON_URI_MAPPING_PRODUCT_RELATED_PAGES_URI_PARTS', DB_PREFIX . 'ceon_uri_mapping_prp_uri_parts');I checked the 5.0.1 zip from CEON and it's there so I don't know if I mixed something up in the install or if this was a bug from 5.0.0. That's the version installed, not 5.0.1 as I thought.
I just downloaded the version 5.0.0 from the Zen Cart site and admin/includes/extra_datafiles/ceon_uri_mapping_database_tables.php included the definition for the table. My guesss is that it was an overseen table from the older 3.6.3 version. Meaning a file didn't get updated during the upgrade.
Totally Zenned
mc12345678:
I just downloaded the version 5.0.0 from the Zen Cart site and admin/includes/extra_datafiles/ceon_uri_mapping_database_tables.php included the definition for the table. My guesss is that it was an overseen table from the older 3.6.3 version. Meaning a file didn't get updated during the upgrade.
I couldn't find it here. I downloaded the plugin from Ceon but the file name is the same for 5.0.0 and 5.0.1 so overwrote the 5.0.0 I had.
Totally Zenned
jeking:
I couldn't find it here. I downloaded the plugin from Ceon but the file name is the same for 5.0.0 and 5.0.1 so overwrote the 5.0.0 I had.
Yeah, kind of weird. Can't find the plugin by searching the downloads area, but was able to get to it from the first post of this thread, but for me on my computer to find this thread I had to go to the version 4 thread to find a post leading to here... oye...
New Zenner
Is it possible to override the canonical link handling for certain mappings?
I have the News Box Manager plugin on 1.5.6, and I have mapped from "main_page=more_news" to "our-latest-news", so the URL might be "our-latest-news?news_id=11" but the problem is that CEON removes the news article ID from the canonical link, leaving a canonical link pointing just to "our-latest-news".
I believe this is intended behaviour so that things like display orders do not show as duplicate content, but in the case of the news articles, they aren't duplicate content and we would want the search engine to treat each article as a separate item.
Totally Zenned
Pingfah:
Is it possible to override the canonical link handling for certain mappings?
I have the News Box Manager plugin on 1.5.6, and I have mapped from "main_page=more_news" to "our-latest-news", so the URL might be "our-latest-news?news_id=11" but the problem is that CEON removes the news article ID from the canonical link, leaving a canonical link pointing just to "our-latest-news".
I believe this is intended behaviour so that things like display orders do not show as duplicate content, but in the case of the news articles, they aren't duplicate content and we would want the search engine to treat each article as a separate item.
It appears that there is something like this at the end of the function _handleStaticURI found in includes/classes/class.CeonURIMappingHandler.php. Would suggest using a similar if statement but to handle your case as well as a similar action within the if statement. There might be another way to implement; however, it appears that all the potentially needed data is present to accomplish the task.
New Zenner
mc12345678:
It appears that there is something like this at the end of the function _handleStaticURI found in includes/classes/class.CeonURIMappingHandler.php. Would suggest using a similar if statement but to handle your case as well as a similar action within the if statement. There might be another way to implement; however, it appears that all the potentially needed data is present to accomplish the task.
Ahh yes, I see it, it is being used to add the ID onto the end of the canonical links for reviews. I will adapt that for my needs.
Many thanks.
New Zenner
Just FYI, this was successful, just copying that chunk of code and changing the file name and the type of _id required, it now produces a canonical link with the article ID in it.
Thanks so much.
Totally Zenned
I'm on 1.5.6
I am getting this error in the logs and I can't load ezpages in the admin
[26-Oct-2019 12:11:54 UTC] Request URI: /beaSt-EgU-sWing/ezpages.php?page=1&ezID=171&action=new, IP address: 86.17.198.133
#1 trigger_error() called at [public_html/includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/public_html/includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [/public_html/includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at [/public_html/includes/classes/class.CeonURIMappingAdmin.php:176]
#5 CeonURIMappingAdmin->_loadAutogenerationSettings() called at [/public_html/includes/classes/class.CeonURIMappingAdmin.php:142]
#6 CeonURIMappingAdmin->__construct() called at [/public_html/includes/classes/class.CeonURIMappingAdminEZPages.php:59]
#7 CeonURIMappingAdminEZPages->__construct() called at [/public_html/beaSt-EgU-sWing/includes/classes/class.CeonURIMappingAdminEZPagePages.php:97]
#8 CeonURIMappingAdminEZPagePages->__construct() called at [/public_html/beaSt-EgU-sWing/includes/init_includes/init_ceon_ezpages_collect_info.php:132]
#9 require(/public_html/beaSt-EgU-sWing/includes/init_includes/init_ceon_ezpages_collect_info.php) called at [/home/lacqueredbrass2/public_html/includes/autoload_func.php:48]
#10 require(/public_html/includes/autoload_func.php) called at [/home/lacqueredbrass2/public_html/beaSt-EgU-sWing/includes/application_top.php:171]
#11 require(/public_html/beaSt-EgU-sWing/includes/application_top.php) called at [/home/lacqueredbrass2/public_html/beaSt-EgU-sWing/ezpages.php:10]
[26-Oct-2019 12:11:54 UTC] PHP Fatal error: 1054:Unknown column 'language_code_add' in 'field list' ::
SELECT
autogen_new,
whitespace_replacement,
capitalisation,
remove_words,
char_str_replacements,
language_code_add,
mapping_clash_action
FROM
ceon_uri_mapping_configs
WHERE
id ='1'; ==> (as called by) /public_html/includes/classes/class.CeonURIMappingAdmin.php on line 176 <== in /home/lacqueredbrass2/public_html/includes/classes/db/mysql/query_factory.php on line 171
Administrator
I've got Sitemap XML v3.9.6 running on zc156c w/ PHP 7.1.32 with Ceon 5.0.0. Recently setup a cron-job to run the Sitemap daily and I'm finding this log each time it runs:
[26-Oct-2019 04:00:03 America/Chicago] Request URI: /home/mystore/public_html/cgi-bin/sitemapxml.php, IP address: 127.0.0.1
#1 strpos() called at [/home/mystore/public_html/includes/classes/class.CeonURIMappingHandlerBase.php:183]
#2 CeonURIMappingHandlerBase->_normaliseServerEnvironment() called at [/home/mystore/public_html/includes/classes/class.CeonURIMappingHandlerBase.php:107]
#3 CeonURIMappingHandlerBase->__construct() called at [/home/mystore/public_html/includes/classes/class.CeonURIMappingHandler.php:52]
#4 CeonURIMappingHandler->__construct() called at [/home/mystore/public_html/includes/autoload_func.php:79]
#5 require(/home/mystore/public_html/includes/autoload_func.php) called at [/home/mystore/public_html/includes/application_top.php:170]
#6 require(/home/mystore/public_html/includes/application_top.php) called at [/home/mystore/public_html/index.php:26]
#7 include(/home/mystore/public_html/index.php) called at [/home/mystore/public_html/cgi-bin/sitemapxml.php:60]
--> PHP Warning: strpos(): Empty needle in /home/mystore/public_html/includes/classes/class.CeonURIMappingHandlerBase.php on line 183.
Is that something that can be bypassed via an .htaccess rule?
Totally Zenned
Nick1973:
I'm on 1.5.6
I am getting this error in the logs and I can't load ezpages in the admin
[26-Oct-2019 12:11:54 UTC] Request URI: /beaSt-EgU-sWing/ezpages.php?page=1&ezID=171&action=new, IP address: 86.17.198.133
#1 trigger_error() called at [public_html/includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/public_html/includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [/public_html/includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at [/public_html/includes/classes/class.CeonURIMappingAdmin.php:176]
#11 require(/public_html/admin/includes/application_top.php) called at [/home/lacqueredbrass2/public_html/admin/ezpages.php:10]
[26-Oct-2019 12:11:54 UTC] PHP Fatal error: 1054:Unknown column 'language_code_add' in 'field list' ::
SELECT
autogen_new,
whitespace_replacement,
capitalisation,
remove_words,
char_str_replacements,
language_code_add,
mapping_clash_action
FROM
ceon_uri_mapping_configs
WHERE
id ='1'; ==> (as called by) /public_html/includes/classes/class.CeonURIMappingAdmin.php on line 176 <== in /home/lacqueredbrass2/public_html/includes/classes/db/mysql/query_factory.php on line 171
Perhaps this earlier post helps?
> **swguy:**
>
> Getting a log for field language_code_add
>
> ```
--> PHP Fatal error: 1054:Unknown column 'language_code_add' in 'field list' :: ^M
SELECT^M
autogen_new,^M
whitespace_replacement,^M
capitalisation,^M
remove_words,^M
char_str_replacements,^M
language_code_add,^M
mapping_clash_action^M
FROM^M
zen_ceon_uri_mapping_configs^M
WHERE^M
id ='1'; ==> (as called by) /home/mysite/public_html/includes/classes/class.CeonURIMappingAdmin.php on line 176 <== in /home/mysite/public_html/includes/classes/db/mysql/query_factory.php on line 171.
Maybe I didn't do the Admin->Modules-Ceon SEO Configuration step?
Totally Zenned
lat9:
I've got Sitemap XML v3.9.6 running on zc156c w/ PHP 7.1.32 with Ceon 5.0.0. Recently setup a cron-job to run the Sitemap daily and I'm finding this log each time it runs:
[26-Oct-2019 04:00:03 America/Chicago] Request URI: /home/mystore/public_html/cgi-bin/sitemapxml.php, IP address: 127.0.0.1
#1 strpos() called at [/home/mystore/public_html/includes/classes/class.CeonURIMappingHandlerBase.php:183]
#2 CeonURIMappingHandlerBase->_normaliseServerEnvironment() called at [/home/mystore/public_html/includes/classes/class.CeonURIMappingHandlerBase.php:107]
#3 CeonURIMappingHandlerBase->__construct() called at [/home/mystore/public_html/includes/classes/class.CeonURIMappingHandler.php:52]
#4 CeonURIMappingHandler->__construct() called at [/home/mystore/public_html/includes/autoload_func.php:79]
#5 require(/home/mystore/public_html/includes/autoload_func.php) called at [/home/mystore/public_html/includes/application_top.php:170]
#6 require(/home/mystore/public_html/includes/application_top.php) called at [/home/mystore/public_html/index.php:26]
#7 include(/home/mystore/public_html/index.php) called at [/home/mystore/public_html/cgi-bin/sitemapxml.php:60]
--> PHP Warning: strpos(): Empty needle in /home/mystore/public_html/includes/classes/class.CeonURIMappingHandlerBase.php on line 183.
> Is that something that can be bypassed via an .htaccess rule?
Seems like that line 183 of includes/classes/class.CeonURiMappingHandlerBase.php perhaps should be:
} else if (!empty($SERVER['DOCUMENT_ROOT']) && strpos($PHP_SELF, $_SERVER['DOCUMENT_ROOT']) !== false) {
What happens with that modification? Also, makes me wonder how it was handled in version 4..
Administrator
Thanks, @mc12345678, I'll give that a shot and report back tomorrow (the cron runs at 5am EDT).
Tell staff why this post should be reviewed.