Totally Zenned
- Join Date:
- Aug 2007
- Location:
- Gijón, Asturias, Spain
- Posts:
- 2,872
- Plugin Contributions:
- 7
Ceon URI Mapping V5.0
Is there a GitHub repository for this?
Not a public one. You have to contact them directly to get one.
Views: 88,596
Totally Zenned
Is there a GitHub repository for this?
Not a public one. You have to contact them directly to get one.
Administrator
On initial entry to Modules->Ceon URI Mapping (SEO) Config after applying the file-set to an in-progress zc156c upgrade (plugin's database elements exist from the store's zc154 version), I received the following PHP Notices:
[22-Jul-2019 11:29:31 America/New_York] Request URI: /store/my_admin/ceon_uri_mapping_config.php, IP address: ::1
#1 CeonURIMappingInstallOrUpgrade->_checkProductRelatedPagesURIPartsExistForLanguages() called at [C:\xampp\htdocs\store\my_admin\includes\classes\class.CeonURIMappingInstallOrUpgrade.php:122]
#2 CeonURIMappingInstallOrUpgrade->__construct() called at [C:\xampp\htdocs\store\my_admin\includes\classes\class.CeonURIMappingConfigUtility.php:242]
#3 CeonURIMappingConfigUtility->_checkInstalledAndUpToDate() called at [C:\xampp\htdocs\store\my_admin\includes\classes\class.CeonURIMappingConfigUtility.php:201]
#4 CeonURIMappingConfigUtility->__construct() called at [C:\xampp\htdocs\store\my_admin\ceon_uri_mapping_config.php:28]
--> PHP Notice: Undefined index: ask_a_question in C:\xampp\htdocs\store\my_admin\includes\classes\class.CeonURIMappingInstallOrUpgrade.php on line 533.
[22-Jul-2019 11:29:32 America/New_York] Request URI: /store/my_admin/ceon_uri_mapping_config.php, IP address: ::1
#1 CeonURIMappingConfigUtility->_buildAutoManagedProductURIsConfigPanel() called at [C:\xampp\htdocs\store\my_admin\includes\classes\class.CeonURIMappingConfigUtility.php:667]
#2 CeonURIMappingConfigUtility->_buildConfigUtilityInterface() called at [C:\xampp\htdocs\store\my_admin\includes\classes\class.CeonURIMappingConfigUtility.php:215]
#3 CeonURIMappingConfigUtility->__construct() called at [C:\xampp\htdocs\store\my_admin\ceon_uri_mapping_config.php:28]
--> PHP Notice: Undefined property: CeonURIMappingConfigUtility::$_ask_a_question_pages_uri_parts in C:\xampp\htdocs\store\my_admin\includes\classes\class.CeonURIMappingConfigUtility.php on line 1084.
I'll note that the notices are not displayed on re-entry to the tool.
Administrator
I'm also having "The page isn't redirecting properly". I've got a test site set up in my local XAMPP environment,
having made the modifications suggested by @torvista on this support-thread posting for v4 of the URI mappings.
My local site's configuration, provided in /local/configure.php identifies the **HTTP_SERVER ** as 'http://www.mysite.local' and the **DIR_WS_SERVER ** is set to '/'.
The .htaccess file contains the ceon-generated defaults:
## BEGIN CEON URI MAPPING REWRITE RULE
RewriteEngine On
# Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])
RewriteCond %{REQUEST_URI} !\.[a-z]{2,5}$ [NC]
# Don't rewrite any URIs for some, popular specific file format extensions,
# which are not covered by main file extension condition above
RewriteCond %{REQUEST_URI} !\.(mp3|mp4|h264|woff2)$ [NC]
# Don't rewrite admin directory
RewriteCond %{REQUEST_URI} !^/myadmin [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/editors/ [NC]
# Don't rewrite feed directory
RewriteCond %{REQUEST_URI} !^/feed/ [NC]
# Don't rewrite logs directory
RewriteCond %{REQUEST_URI} !^/logs/ [NC]
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* index.php [QSA,L]
## END CEON URI MAPPING REWRITE RULE
The multiple redirects are, as identified by @wvasconselos here, within the _checkForAndHandleIndexPage processing for the index page.
I enter https://www.mysite.local in the browser address bar, I'm seeing that on entry to that function that $request_uri is set to '/', $_GET['main_page'] is set to 'index' and no other $_GET variables are present. The $redirection_uri to which the request is sent is '/' (same as entered); that's where the loop arises.
I'll also note that the site displays once the URI mappings are disabled in the admin.
Totally Zenned
You beat me to it.
Following upgrade to 1.56c CEON URI 5.0 is producing a 301 error - store side. Likewise disabling the mod and all's well.
During the upgrade everythings ok with all 1.56c file changes except /includes/auto_loaders/config.core.php - this breaks CEON URI 5.0/ZC
The 1.56c changes to this file seem to be a reordering of init_sanitize.php and init_script.php.
edit: on a local machine using wampserver
Administrator
simon1066:
You beat me to it.
Following upgrade to 1.56c CEON URI 5.0 is producing a 301 error - store side. Likewise disabling the mod and all's well.
During the upgrade everythings ok with all 1.56c file changes except /includes/auto_loaders/config.core.php - this breaks CEON URI 5.0/ZC
The 1.56c changes to this file seem to be a reordering of init_sanitize.php and init_script.php.
edit: on a local machine using wampserver
Nice bit of debugging, @simon1066! I was able to successfully load my locally-hosted storefront by modifying /includes/auto_loaders/config.ceon_uri_mapping.php, changing
$autoLoadConfig[99][] = array(
'autoType' => 'classInstantiate',
'className' => 'CeonURIMappingHandler',
'objectName' => 'ceon_uri_mapping'
);
to
$autoLoadConfig[[B]95[/B]][] = array(
'autoType' => 'classInstantiate',
'className' => 'CeonURIMappingHandler',
'objectName' => 'ceon_uri_mapping'
);
Totally Zenned
Glad to have spotted it. Thank you for the fix, that makes sense although I wouldn't have thought of it - I will next time though.
Totally Zenned
Looks like there are two ways to address the issue in light of that situation.
Either change the loadpoint of CeonURIMappingHandler to say 95 (as suggested by lat9) from 99 (would think some review would be desirable based on the move of the init_sanitize load point from 100 to 96) or to leave the loadpoint alone and modify the code in the class to something like:
// Handle variations of the index page URI
if ((isset($_GET['main_page']) &&
(strlen($_GET['main_page']) == 0 || $_GET['main_page'] == FILENAME_DEFAULT) &&
!isset($_GET['cPath']) && !isset($_GET['manufacturers_id']) && !isset($_GET['typefilter']) && $request_uri == strtolower(DIR_WS_CATALOG) . 'index.php') ||
(!isset($_GET['main_page']) && $request_uri == strtolower(DIR_WS_CATALOG) . 'index.php')) {
though with the complexity of that 'if' statement I would think that there is a better way to rewrite it to capture all of the conditions.
Totally Zenned
mc12345678:
Looks like there are two ways to address the issue in light of that situation.
Either change the loadpoint of CeonURIMappingHandler to say 95 (as suggested by lat9) from 99 (would think some review would be desirable based on the move of the init_sanitize load point from 100 to 96) or to leave the loadpoint alone and modify the code in the class to something like:
// Handle variations of the index page URI
if ((isset($_GET['main_page']) &&
(strlen($_GET['main_page']) == 0 || $_GET['main_page'] == FILENAME_DEFAULT) &&
!isset($_GET['cPath']) && !isset($_GET['manufacturers_id']) && !isset($_GET['typefilter']) && $request_uri == strtolower(DIR_WS_CATALOG) . 'index.php') ||
(!isset($_GET['main_page']) && $request_uri == strtolower(DIR_WS_CATALOG) . 'index.php')) {
>
> though with the complexity of that 'if' statement I would think that there is a better way to rewrite it to capture all of the conditions.
Nix the code change highlighted in red as it doesn't resolve all conditions expected to address.
Totally Zenned
ZC v1.56c
PHP v7.2.10
In admin > modules > payment with Paypal EC and Square enabled I get these PHP warnings on a page refresh:
(this refers to paypal.php, the others refer to paypalwpp.php & square.php)
[24-Jul-2019 18:33:45 Europe/London] Request URI: /admin/modules.php?set=payment, IP address: 127.0.0.1
#1 CeonURIMappingLinkBuildAdmin->updateNotifySEFUInterceptAdmcathref() called at [D:\wamp64\www\mydomain.co.uk\includes\classes\class.base.php:103]
#2 base->notify() called at [D:\wamp64\www\mydomain.co.uk\admin\includes\functions\html_output.php:50]
#3 zen_catalog_href_link() called at [D:\wamp64\www\mydomain.co.uk\includes\languages\english\modules\payment\paypal.php:14]
#4 include(D:\wamp64\www\mydomain.co.uk\includes\languages\english\modules\payment\paypal.php) called at [D:\wamp64\www\mydomain.co.uk\admin\modules.php:192]
--> PHP Warning: Use of undefined constant ENABLE_SSL - assumed 'ENABLE_SSL' (this will throw an Error in a future version of PHP) in D:\wamp64\www\mydomain.co.uk\admin\includes\classes\observers\class.CeonURIMappingLinkBuildAdmin.php on line 46.
relevant lines in admin\includes\classes\observers\class.CeonURIMappingLinkBuildAdmin.php are:
if ($connection == 'NONSSL') {
$link = HTTP_SERVER;
} elseif ($connection == 'SSL') {
if (ENABLE_SSL == 'true') {
$link = HTTPS_SERVER;
} else {
$link = HTTP_SERVER;
}
}
Totally Zenned
simon1066:
ZC v1.56c
PHP v7.2.10In admin > modules > payment with Paypal EC and Square enabled I get these PHP warnings on a page refresh:
(this refers to paypal.php, the others refer to paypalwpp.php & square.php)
[24-Jul-2019 18:33:45 Europe/London] Request URI: /admin/modules.php?set=payment, IP address: 127.0.0.1
#1 CeonURIMappingLinkBuildAdmin->updateNotifySEFUInterceptAdmcathref() called at [D:\wamp64\www\mydomain.co.uk\includes\classes\class.base.php:103]
#2 base->notify() called at [D:\wamp64\www\mydomain.co.uk\admin\includes\functions\html_output.php:50]
#3 zen_catalog_href_link() called at [D:\wamp64\www\mydomain.co.uk\includes\languages\english\modules\payment\paypal.php:14]
#4 include(D:\wamp64\www\mydomain.co.uk\includes\languages\english\modules\payment\paypal.php) called at [D:\wamp64\www\mydomain.co.uk\admin\modules.php:192]
--> PHP Warning: Use of undefined constant ENABLE_SSL - assumed 'ENABLE_SSL' (this will throw an Error in a future version of PHP) in D:\wamp64\www\mydomain.co.uk\admin\includes\classes\observers\class.CeonURIMappingLinkBuildAdmin.php on line 46.
>
> relevant lines in admin\includes\classes\observers\class.CeonURIMappingLinkBuildAdmin.php are:
>
> ```
if ($connection == 'NONSSL') {
$link = HTTP_SERVER;
} elseif ($connection == 'SSL') {
if (ENABLE_SSL == 'true') {
$link = HTTPS_SERVER;
} else {
$link = HTTP_SERVER;
}
}
Looks like those are incorrectly trying to resolve to "admin" style links instead of the expected catalog style.
in admin\includes\classes\observers\class.CeonURIMappingLinkBuildAdmin.php
Change:
if ($connection == 'NONSSL') {
$link = HTTP_SERVER;
} elseif ($connection == 'SSL') {
if (ENABLE_SSL == 'true') {
$link = HTTPS_SERVER;
} else {
$link = HTTP_SERVER;
}
}
To:
if ($connection == 'NONSSL') {
$link = HTTP_CATALOG_SERVER;
} elseif ($connection == 'SSL') {
if (ENABLE_SSL_CATALOG == 'true') {
$link = HTTPS_CATALOG_SERVER;
} else {
$link = HTTP_CATALOG_SERVER;
}
}
Totally Zenned
mc12345678:
if ($connection == 'NONSSL') {
$link = HTTP_CATALOG_SERVER;
} elseif ($connection == 'SSL') {
if (ENABLE_SSL_CATALOG == 'true') {
$link = HTTPS_CATALOG_SERVER;
} else {
$link = HTTP_CATALOG_SERVER;
}
}
Thank you @mc12345678, that solved the issue.
New Zenner
I've just installed this on 1.5.6, and wanted to say, great job. It is a bloody fantastic bit of software.
New Zenner
Has anybody got Ceon's Mapping Manager installed on 1.5.6? I would like to buy it as my store already has thousands of products and I don't want to map them manually, but just wanted to be sure it has also been updated to 1.5.6.
Totally Zenned
On their site they have an updated version, no doubt that works.
(I modified the old one before they had that available and haven't got a need for the new one yet.)
New Zenner
torvista:
On their site they have an updated version, no doubt that works.
(I modified the old one before they had that available and haven't got a need for the new one yet.)
Thank you.
Another question, has anybody got this working with Dynamic Filter plugin? IS there any way to get them to work together? The mapping works brilliantly, but any attempt to filter dynamically results in a 404 error.
New Zenner
I need to add more information to this:
I am using ZC1.5.6
Plugins:
Dynamic Filter
CEON URI Mapping
Easy Populate 4
Running on an Apache server with PHP 7.1.
The URL is formed as folowing:
mydomain.co.uk/dynamic_filter?cPath=108_109_112&sort=20a&fltExpressDelivery[]=1+Day+Express+Delivery
but all the results disappear and give a 404 error instead.
It seems to be missing part of the URL, my other site with just Dynamic FIlter gives a result like this:
mydomain.co.uk/dynamic_filter?main_page=index&cPath=293_347_348&sort=20a&fltCategories%5B%5D=Pens
The "main_page=index&" is missing from the URL that is not functioning. If I paste it in, then suddenly it redirects to the URI mapped category names, and displays the correct results.
Is this perhaps something that can be fixed from the .htaccess entry?
Totally Zenned
applied the fix listed above here
and the site is working for known pages.
If I enable "Auto-generate URIs for Unmapped Categories/Products/Manufacturers/EZ-Pages"
I get this error
#1 trigger_error() called at [/home/spares/public_html/includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/home/spares/public_html/includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [/home/spares/public_html/includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at [/home/spares/public_html/includes/classes/class.CeonURIMappingAdminEZPages.php:189]
#5 CeonURIMappingAdminEZPages->autogenEZPageURIMapping() called at [/home/spares/public_html/includes/classes/class.CeonURIMappingHREFLinkBuilder.php:685]
#6 CeonURIMappingHREFLinkBuilder->_autogenEZPageURIMapping() called at [/home/spares/public_html/includes/classes/class.CeonURIMappingHREFLinkBuilder.php:337]
#7 CeonURIMappingHREFLinkBuilder->buildHREFLink() called at [/home/spares/public_html/includes/classes/observers/class.ceon_uri_mapping_link_build.php:47]
#8 CeonUriMappingLinkBuild->updateNotifySefuIntercept() called at [/home/spares/public_html/includes/classes/class.base.php:103]
#9 base->notify() called at [/home/spares/public_html/includes/functions/html_output.php:35]
#10 zen_href_link() called at [/home/spares/public_html/includes/functions/functions_ezpages.php:53]
#11 zen_ez_pages_link() called at [/home/spares/public_html/includes/templates/yourstore/common/tpl_header_v2.php:122]
#12 require(/home/spares/public_html/includes/templates/yourstore/common/tpl_header_v2.php) called at [/home/spares/public_html/includes/templates/yourstore/common/tpl_main_page.php:192]
#13 require(/home/spares/public_html/includes/templates/yourstore/common/tpl_main_page.php) called at [/home/spares/public_html/index.php:97]
--> PHP Fatal error: 1054:Unknown column 'pages_title' in 'field list' ::
SELECT
pages_title
FROM
ezpages
WHERE
pages_id = '27'
AND
languages_id = '1' ==> (as called by) /home/spares/public_html/includes/classes/class.CeonURIMappingAdminEZPages.php on line 189 <== in /home/spares/public_html/includes/classes/db/mysql/query_factory.php on line 171.
Changing /includes/classes/class.CeonURIMappingAdminEZPages.php
FROM " . TABLE_EZPAGES . "
to
FROM " . TABLE_EZPAGES_CONTENT . "
Solves that problem
Totally Zenned
If "Auto-generate URIs for Unmapped Categories/Products/Manufacturers/EZ-Pages" is enabled, creating category mappings in the Manager appears to hang.
Totally Zenned
I wasn't able to reproduce either of the errors in the last two posts.
Totally Zenned
Then you are a winner and I am unlucky
Tell staff why this post should be reviewed.