Zen Cart Logo
Forums / All Other Contributions/Addons / Ceon URI Mapping v4.x

Ceon URI Mapping v4.x

Views: 451,771

Results 2,421 to 2,440 of 2,454
26 Aug 2019, 18:04
#2421
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

Ceon URI Mapping v4.x

pixelpadre:

I am getting a blank page when creating/editing any category or product. debug gives me
--> PHP Warning: Use of undefined constant FILENAME_PRODUCT_MUSIC_INFO - assumed 'FILENAME_PRODUCT_MUSIC_INFO' (this will throw an Error in a future version of PHP) in pathtomystore.com/includes/extra_datafiles/ceon_uri_mapping_product_pages.php on line 26.

I am using php 7.2. Is this the source of my problem?PHP 7.2 is more strict than its predecessors. This define doesn't show in a plain 1.5.6c install but, a search with Developers Tool Kit looking for a define statement of the constant should find the bad define. Even if it is defined as null (two single quotes 'nothing in between') should keep 7.2 from complaining.

26 Aug 2019, 18:57
#2422
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

dbltoe:

PHP 7.2 is more strict than its predecessors. This define doesn't show in a plain 1.5.6c install but, a search with Developers Tool Kit looking for a define statement of the constant should find the bad define. Even if it is defined as null (two single quotes 'nothing in between') should keep 7.2 from complaining.

Ceon has always been a headache. I see that there is a new thread for v5. Maybe thats what I need to do.

05 Nov 2019, 00:25
#2423
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

I have created a folder in public_html of an existing live website as a test folder for upgrading to ZC 1.5.6C via the rebuild method , has clean v1.5.6c loaded - when I try to access this folder (to install ZC) I get taken to the website 'page not found' page. I tried this on another website and the same thing happened. I have contacted my host and they say it is the way the internal redirecting is set up.

What is it in CEON that is causing this and how can it be sorted out please.

cheers,
Mike

05 Nov 2019, 00:53
#2424
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

here is my .htaccess file if of some assistance to the above inquiry

#Force SSL
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTP_HOST} !^www.dazzlerscliponearrings.com.au$ [NC]
RewriteRule ^(.*)$ https://www.dazzlerscliponearrings.com.au/$1 [L,R=301]

###############################################################################
# Add custom headers and options

###############################################################################
# Notes:
#
# Examples: Adding IE compatibility / edge flags, language and encoding flags,
# php or suphp directives, configure other Apache modules such as page_speed,
# and enable or disable Apache httpd options.
#
# Do NOT configure anything directly relating to physical or virtual resources
# in this section. These should be addressed later on in this file.
###############################################################################
#Options -Indexes

###############################################################################
# Enable mod_rewrite processing using the rules in this .htaccess file
###############################################################################
# Notes:
#
# <IfModule> should be avoided at all costs. If mod_rewrite is not available
# it is almost always better to return HTTP 500 status. This way we see there
# is an issue as soon as the .htaccess file is uploaded.
#
# For mod_rewrite to work, the Apache server option to allow symbolic links to
# be followed must be enabled. Most providers supporting mod_rewrite will
# already have it enabled for you, but if your rewrite rules are not working
# you can un-comment the first directive below to manually enable the option.
#
# Don't forget, mod_rewrite directives are processed in order until a matching
# RewriteRule with the [L] flag is encountered. So the more specific a rule is
# the closer it should appear to the top of this file.
###############################################################################
#Options +FollowSymLinks
RewriteEngine on

###############################################################################
# Tell mod_rewrite where this file is relative to the server document_root
###############################################################################
# Notes:
#
# This directive should only be enabled if this .htaccess file is not placed
# in the document_root (usually public_html, www, or web) of the (sub)domain.
#
# An easy way to determine the location relative to the server document_root is
# to look at the URL used to access a file in this folder. For example if you
# access a "page" in the same folder as this file by typing in the URL
# "www.mydomain.com/myfolder/index.html" then "myfolder" will be the location
# of this file relative to the server document_root.
#
# Another quick and easy way to determine the correct setting for this is to
# look at the defined value for DIR_WS_CATALOG and DIR_WS_HTTPS_CATALOG in
# Zen Cart's configure.php files. All three values should match.
#
# Don't forget the leading and trailing /. This directive requires both!
###############################################################################
#RewriteBase /shop/

###############################################################################
# Redirect if request was for index.php (no query)
###############################################################################
# Notes:
#
# This is only required if the site generates references to index.php with no
# parameters. This rule will force a 301 redirect to the site root when a
# request is made for "/index.php" with no query terms (?key=value).
###############################################################################
#RewriteCond %{QUERY_STRING} ^$
#RewriteRule ^index\.php$ / [R=301,L]

###############################################################################
# Add any custom 301 redirects
###############################################################################
# Notes:
#
# In general these should be few and far between. If you use a RewriteRule
# be sure to add the L flag to let Apache mod_rewrite know to stop processing
# and skip any RewriteRules defined later in the .htaccess file.
###############################################################################

###############################################################################
# Redirect if request was for index.php (with or without query)
###############################################################################
# Notes:
#
# This is a performance optimization. If the request is for index.php simply
# pass the request on and do not process any other mod_rewrite directives in
# this file.
#
# Basically this avoids the overhead of checking if index.php is a real file
# or directory (used in subsequent mod_rewrite rules) before sending the
# request to index.php.
###############################################################################
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^index\.php$ - [L]

###############################################################################
# Add any other directives relating to the handling of physical files
###############################################################################
# Notes:
#
# If processing makes it this far, the request was for a real file or folder.
# Example: Adding further processing related to browser caching or security.
###############################################################################

<IfModule mod_security.c>
    SecFilterScanPOST Off
</IfModule>

###############################################################################

##############################################################################
## BEGIN CEON URI MAPPING REWRITE RULE

RewriteEngine On

# Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])
# Don't rewrite any URIs for some, popular specific file format extensions,
#   which are not covered by main file extension condition above
# Don't rewrite any URIs for some specific file format extensions,
#   which are not covered by main file extension condition above
#   Uncomment the following line to apply this condition! (Remove the # at the start of the next line)
#RewriteCond %{REQUEST_URI} !\.(3gp|3g2|h261|h263|mj2|mjp2|mp4v|mpg4|m1v|m2v|m4u|f4v|m4v|3dml)$ [NC]
# Don't rewrite admin directory
# Don't rewrite editors directory
# Don't rewrite bmz_cache directory
# Don't rewrite .well-known directory
# Don't rewrite teststore directory
# Don't rewrite cgi-bin directory
# Don't rewrite zc_install_done directory
# Don't rewrite .htpasswds directory
# Don't rewrite blog directory
# Don't rewrite logs directory
# Don't rewrite sitemap directory
# Don't rewrite temp directory
# Handle all other URIs using Zen Cart (its index.php)
RewriteCond %{REQUEST_URI} !\.[a-zA-Z]{2,5}$ [OR] 
RewriteCond %{REQUEST_URI} \.(html)$ [NC]
RewriteCond %{REQUEST_URI} !\.(mp3|mp4|h264)$ [NC]
RewriteCond %{REQUEST_URI} !^/dazzlers [NC]
RewriteCond %{REQUEST_URI} !^/editors/ [NC]
RewriteCond %{REQUEST_URI} !^/bmz_cache/ [NC]
RewriteCond %{REQUEST_URI} !^/\.well\-known/ [NC]
RewriteCond %{REQUEST_URI} !^/teststore/ [NC]
RewriteCond %{REQUEST_URI} !^/cgi\-bin/ [NC]
RewriteCond %{REQUEST_URI} !^/zc_install_done/ [NC]
RewriteCond %{REQUEST_URI} !^/\.htpasswds/ [NC]
RewriteCond %{REQUEST_URI} !^/blog/ [NC]
RewriteCond %{REQUEST_URI} !^/logs/ [NC]
RewriteCond %{REQUEST_URI} !^/sitemap/ [NC]
RewriteCond %{REQUEST_URI} !^/temp/ [NC]
RewriteRule .* index.php [QSA,L]

## END CEON URI MAPPING REWRITE RULE

###############################################################################
# Add any other directives relating to the handling of physical files
###############################################################################
# Notes:
#
# If processing makes it this far, the request was for a real file or folder.
# Example: Adding further processing related to browser caching or security.
###############################################################################

##################
## Optional caching improvements
## Requires mod_header and mod_deflate to be enabled within Apache
##################
<filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|webp|js|css|swf)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
<IfModule mod_deflate.c>
  <FilesMatch "(?i)\.(js|css)$">
    SetOutputFilter DEFLATE
  </FilesMatch>
</IfModule>

##################
## Optional improvements
## Requires mod_expires to be enabled within Apache
##################
## EXPIRES HEADER CACHING ##
 <IfModule mod_expires.c>
 ExpiresActive On
 ExpiresByType image/jpg "access 1 year"
 ExpiresByType image/jpeg "access 1 year"
 ExpiresByType image/gif "access 1 year"
 ExpiresByType image/png "access 1 year"
 ExpiresByType text/css "access 1 month"
 ExpiresByType application/pdf "access 1 month"
 ExpiresByType application/javascript "access 1 month"
 ExpiresByType application/x-javascript "access 1 month"
 ExpiresByType application/x-shockwave-flash "access 1 month"
 ExpiresByType image/x-icon "access 1 year"
 ExpiresDefault "access 7 days"
 </IfModule>
 ## EXPIRES HEADER CACHING
RewriteCond %{HTTP_HOST} ^dazzlerscliponearrings\.com\.au$ [OR]
RewriteCond %{HTTP_HOST} ^www\.dazzlerscliponearrings\.com\.au$
RewriteRule ^dazzlers\-clip\-on\-earrings\-full\-range$ "https\:\/\/www\.dazzlerscliponearrings\.com\.au\/all\-clip\-on\-earrings\-c\-1" [R=302,L]

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php70” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php70 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
05 Nov 2019, 23:44
#2425
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

shags38:

I have created a folder in public_html of an existing live website as a test folder for upgrading to ZC 1.5.6C via the rebuild method , has clean v1.5.6c loaded - when I try to access this folder (to install ZC) I get taken to the website 'page not found' page. I tried this on another website and the same thing happened. I have contacted my host and they say it is the way the internal redirecting is set up.

What is it in CEON that is causing this and how can it be sorted out please.

cheers,
Mike

I have managed to access the installer for ZC by adding .php at the end of /zc_install ... also refer to image where after completing the installation process the links to admin and store do not include the suffixes (/login.php and /index.php respectively) so they also resolve to page not found. It is terribly frustrating.

Is there an issue with CEON and configuration and/or .htaccess that does not allow these pages to resolve?

cheers,
Mike

05 Nov 2019, 23:58
#2426
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

oooops .... forgot to attach the image

[Attachment no longer available]

06 Nov 2019, 00:15
#2427
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

the ceon module has never liked other domains in subfolders. As you have to traverse the main domains folder (public_html) the .htaccess for the main domain get processed and then it tries to handle the url with the main domain instead of ignoring and sending you to the correct folder. So go into the .htaccess file and look for the section with a bunch of the following ```

Don't rewrite "SOME_DIRECTORY_NAME" directory

RewriteCond %{REQUEST_URI} !^/some_folder_name/ [NC]

dplicate one of them and change the folder name to match the new folder name your having issues with, that should keep the site above that folder from interferring.
06 Nov 2019, 14:52
#2428
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

shags38:

I have created a folder in public_html of an existing live website as a test folder for upgrading to ZC 1.5.6C via the rebuild method , has clean v1.5.6c loaded - when I try to access this folder (to install ZC) I get taken to the website 'page not found' page. I tried this on another website and the same thing happened. I have contacted my host and they say it is the way the internal redirecting is set up.

What is it in CEON that is causing this and how can it be sorted out please.

cheers,
Mike

barco57:

the ceon module has never liked other domains in subfolders. As you have to traverse the main domains folder (public_html) the .htaccess for the main domain get processed and then it tries to handle the url with the main domain instead of ignoring and sending you to the correct folder. So go into the .htaccess file and look for the section with a bunch of the following ```

Don't rewrite "SOME_DIRECTORY_NAME" directory

RewriteCond %{REQUEST_URI} !^/some_folder_name/ [NC]

> dplicate one of them and change the folder name to match the new folder name your having issues with, that should keep the site above that folder from interferring.
Anything that results in the RewriteRule within the htaccess to be executed will be processed by the referenced rule. While barco57 points at an issue with different domains, it is possible for various domains to be handled in a single htaccess, but it requires some manipulation.

To answer the question of what is "in" Ceon URI that causes this? Actually it is in nothing within the software, but as barco57 it's in the htaccess. For example, if you were now to go into your existing operational site and go to the installation check area, the generated htaccess file (which may still require some editing) would be different than your existing. The difference expected to be the addition of the new directory(ies) that are not listed currently.

Basically if the Web address path is not excluded from that listing, then the database will be searched for the information in the address and processed by the referenced store. There are other rewrite rule methods that can be used to inspect the server files and if the request is back to an existing file (whatever it may be or contain) then the site's code is ignored.
06 Nov 2019, 20:48
#2429
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Yeah what he said...

07 Nov 2019, 00:58
#2430
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

thanks mc123456789 .... a detailed explanation which again confirms the complexity of CEON and the pain it causes for those like me who do not fully understand its quirks, and specifically for my purposes at least as I do not use the finesses that this program offers, I just require url redirection. For others it is apparently the best code ever written.

Hence with the rebuild I am likely to revert to USU - it begs the question, without adding that code to the .htaccess can I expect the same thing to happen when I next want to upgrade a site using the rebuild process as described earlier (rhetorical question) ... fopr the uninitiated the answer would be yes.

Food for thought .... to avoid this situation from repeating in the future, which takes up valuable time and resources on both sides of the forum screen .....

So would it be a pertinent thing to consider modifying the ZC install instructions, or adding a special condition advice, where it covers running zc_install and gives example mydomain/zc_install and mydomain/catalog/zc_install to read mydomain/zc_install**.php** and mydomain/catalog/zc_install**.php** so that it will actually run? The instructions state that the ZC program is smart enough to know what to look for, and it is for upgrades or new installs but it appears that where CEON is already installed and the rebuild method is used that CEON overrides ZC .... for the reasons you elaborated on above. Through frustrating trial and error I stumbled upon that 'solution' - even when the install is complete, as per the image above, the urls will not work for someone who has CEON installed. Problematic to say the least :smile:

cheers,
Mike

07 Nov 2019, 03:06
#2431
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

shags38:

thanks mc123456789 .... a detailed explanation which again confirms the complexity of CEON and the pain it causes for those like me who do not fully understand its quirks, and specifically for my purposes at least as I do not use the finesses that this program offers, I just require url redirection. For others it is apparently the best code ever written.

Hence with the rebuild I am likely to revert to USU - it begs the question, without adding that code to the .htaccess can I expect the same thing to happen when I next want to upgrade a site using the rebuild process as described earlier (rhetorical question) ... fopr the uninitiated the answer would be yes.

Food for thought .... to avoid this situation from repeating in the future, which takes up valuable time and resources on both sides of the forum screen .....

So would it be a pertinent thing to consider modifying the ZC install instructions, or adding a special condition advice, where it covers running zc_install and gives example mydomain/zc_install and mydomain/catalog/zc_install to read mydomain/zc_install**.php** and mydomain/catalog/zc_install**.php** so that it will actually run? The instructions state that the ZC program is smart enough to know what to look for, and it is for upgrades or new installs but it appears that where CEON is already installed and the rebuild method is used that CEON overrides ZC .... for the reasons you elaborated on above. Through frustrating trial and error I stumbled upon that 'solution' - even when the install is complete, as per the image above, the urls will not work for someone who has CEON installed. Problematic to say the least :smile:

cheers,
Mike

I'm curious, in your server's response about the page not being found, was there anything about a 404 error?

07 Nov 2019, 04:42
#2432
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

mc12345678:

I'm curious, in your server's response about the page not being found, was there anything about a 404 error?

the attempt(s) resolved to the website page not found page - after a number of attempts I contacted my host and explained the situation and their response was that due to the redirect code in the .htaccess file that the url (complete folder) was not able to be served. That is why I posted in here :smile:

cheers,
Mike

30 Dec 2019, 12:35
#2433
ravynw34 avatar

ravynw34

Zen Follower

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
112
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Glad I ran across this post. Trying to upgrade a client who is on 1.54 and has ceon running. Her site has gone wonky and even the upgrade is being made difficult with all kinds of crazy redirects. This may be the issue I have been banging my head trying to figure out. even a test site in a subdirectory is redirecting to the main page of her live site.

05 Jan 2020, 08:01
#2435
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

jsarwar:

Is it possible to use auto generate option to generate URI for product with out including category name e.g.

Instead of https://www.store.com/books/life-is-good
Looking to get https://www.store.com/life-is-good
Can be done with the commercial version otherwise would have to find and modify code to specifically address removal at the auto-generation point.

One thing to note though is that if the result of two entries is the same name, that something has to be done to allow accessing each independently.

22 Jan 2020, 22:50
#2436
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

I just uploaded a bunch of products via Easy Populate for a client, would now like to generate URI's.

Here are the versions being used (old, I know):
ZC 1.5.4
Ceon URI v4.5.0

Way back on Page 195, there was discussion of how to get Ceon URI to auto-generate links on products (Posts #1945 & #1947). I tried DrByte's version first, then bobthemolder's but could not get either to work.

What I did was:

  1. Drop the code into an empty php file that I named ceon_URI_generator.php
  2. Uploaded the file to the Admin folder.
  3. Logged into Admin.
  4. Manually loaded the php file: MySite.com/Admin-Folder/ceon_URI_generator.php

For the older code (from post #1945), I received mysql_query warnings:
User accessed denied, link to server not established, etc.

DrByte's code (#1947) seemed to make a connection, but gave me a bunch of goblety gook.

Did I put the code in the wrong place? Or do I need different code to work with my ZC/Ceon versions?

Thanks,
Mike

23 Jan 2020, 03:33
#2437
neekfenwick avatar

neekfenwick

New Zenner

Join Date:
Feb 2009
Posts:
101
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Feznizzle:

For the older code (from post #1945), I received mysql_query warnings:
User accessed denied, link to server not established, etc.

Just on a technical note, the code from post #1945 seems to use raw mysql commands which I'm guessing are not connected in your case, whereas the usual zen cart 'way' is to use the global $db object, which can be used to fetch resultsets, e.g. instead of:

        $categories = mysql_query("SELECT * FROM zen_categories LEFT JOIN zen_categories_description ON zen_categories.categories_id = zen_categories_description.categories_id WHERE zen_categories.categories_status='1'");
        echo "<p>Click on a category to update it's products: <br/>";
        while ($showthiscat = mysql_fetch_assoc($categories)){
            echo "<a href='update-ceon-uri.php?updatecategory={$showthiscat['categories_id']}'>{$showthiscat['categories_name']}</a>, \n";
        }

You would use something like:

        // **if you are in a function, include this line** global db;
        $categories = $db->Execute("SELECT * FROM zen_categories LEFT JOIN zen_categories_description ON zen_categories.categories_id = zen_categories_description.categories_id WHERE zen_categories.categories_status='1'");
        echo "<p>Click on a category to update it's products: <br/>";
        while (!$categories->EOF) {
            echo "<a href='update-ceon-uri.php?updatecategory={$categories->fields['categories_id']}'>{$categories->fields['categories_name']}</a>, \n";
            $categories->MoveNext();
        }

There is some kind of iterator support in recent versions of zencart, which you could use 'foreach' loops with, but for me they always return garbled results that aren't worth trying to work with, it's easier to just use an EOF test and call MoveNext() for me :)

So, to use the code from that post and you're running in the context of a zen cart page which has bootstrapped with application_top.php as it started loading, you'll possibly want to refactor it to use the $db object to achieve database connectivity.

23 Jan 2020, 08:30
#2438
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Ceon URI Mapping v4.x

Regarding find a way to generate and control the mappings, I don't understand why people do not buy the commercial mod (and get free support) to do this?
Is the value of people's time so low that it is worth spending hours (not) achieving a diy solution?

23 Jan 2020, 14:02
#2439
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

torvista:

Regarding find a way to generate and control the mappings, I don't understand why people do not buy the commercial mod (and get free support) to do this?
Is the value of people's time so low that it is worth spending hours (not) achieving a diy solution?

I did buy the comm mod, first for another site and then later I bought another copy for this site specifically. My first purchased copy was actually beta, prior to the first release. I was going back and forth with Conor, helping him trouble shoot.

But then he passed away. When I updated this site to zc154, I could not update the comm copy of the manager because it simply was not available. And at this point, I don't want to go through the hassles of upgrading. I just want to generate the stupid URI's and call it a day.

Who is selling the comm mod these days and where can I go to buy?