ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
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.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
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.
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
Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk
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:
Is that something that can be bypassed via an .htaccess rule?Code:[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.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Seems like that line 183 of includes/classes/class.CeonURiMappingHandlerBase.php perhaps should be:
What happens with that modification? Also, makes me wonder how it was handled in version 4..Code:} else if (!empty($SERVER['DOCUMENT_ROOT']) && strpos($PHP_SELF, $_SERVER['DOCUMENT_ROOT']) !== false) {
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Thanks, @mc12345678, I'll give that a shot and report back tomorrow (the cron runs at 5am EDT).
Bookmarks