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

Ceon URI Mapping v4.x

Views: 451,986

Results 2,081 to 2,100 of 2,454
8 Jan 2017, 9:56 PM
#2081
mc12345678 avatar

mc12345678

Totally Zenned

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

Ceon URI Mapping v4.x

f7dem:

When I added the following code to the .htaccess file in my zencart directory, it worked for me.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /zencart directory/index.php [QSA,L]
That is one possible solution/method to apply, though it is a bit more server intensive because the attempted file(s) in the path need to be tested against the contents of the server to see if the file/directory does or does not exist. Although there shouldn't really be a space as part of the resolving url (ie. In /zencart directory/ this should be a complete word or phrase like /zencart_directory/ instead).

7 Feb 2017, 11:21 AM
#2082
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 the generation of the canonical url.

ZC vanilla: <link rel="canonical" href="https://DOMAIN/SUBDIR**/**">
CEON URI: <link rel="canonical" href="https://DOMAIN/SUBDIR">

So what!

Well, while reinventing code for structured data/og tags for facebook, I found that re-using this url in the og:url tag was failing in the CEON case (resulting in facebook not finding anything on the home page, using the opengraph debugger) due that missing trailing slash.

Looking in class.CEONUriMappingHandlerBase.php I find:

// Remove any trailing slash(es) from the canonical URI, unless the URI is the root of the site
while (strlen($ceon_uri_mapping_canonical_uri) > 1 &&
substr($ceon_uri_mapping_canonical_uri, -1) == '/') {
$ceon_uri_mapping_canonical_uri =
substr($ceon_uri_mapping_canonical_uri, 0, strlen($ceon_uri_mapping_canonical_uri) - 1);
}
While this does remove the trailing slash, I don't see any exclusion for the shop root/home page.
For the moment I have changed it to this:
// Remove any trailing slash(es) from the canonical URI, unless the URI is the root of the site
while (**$this_is_home_page && **strlen($ceon_uri_mapping_canonical_uri) > 1 &&
substr($ceon_uri_mapping_canonical_uri, -1) == '/') {
$ceon_uri_mapping_canonical_uri =
substr($ceon_uri_mapping_canonical_uri, 0, strlen($ceon_uri_mapping_canonical_uri) - 1);
}
and it has cured this particular issue.

I can see this being another one of my monologs...

7 Feb 2017, 1:33 PM
#2083
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ceon URI Mapping v4.x

torvista:

Regarding the generation of the canonical url.

ZC vanilla: <link rel="canonical" href="https://DOMAIN/SUBDIR**/**">
CEON URI: <link rel="canonical" href="https://DOMAIN/SUBDIR">

So what!

Well, while reinventing code for structured data/og tags for facebook, I found that re-using this url in the og:url tag was failing in the CEON case (resulting in facebook not finding anything on the home page, using the opengraph debugger) due that missing trailing slash.

Looking in class.CEONUriMappingHandlerBase.php I find:

While this does remove the trailing slash, I don't see any exclusion for the shop root/home page.
For the moment I have changed it to this:

and it has cured this particular issue.

I can see this being another one of my monologs...
So shouldn't the note above that code also be modified? Only remove trailing slashes on the home page? Currently as provided it only removes the trailing slash when on the home page and not on any other page whereas before it described that the trailing slash would be removed from all pages but the homepage, though it didn't specifically remove/account for the page being the homepage...

How does the change affect linked product if any by leaving the trailing slash followed by the '?' and master category?

7 Feb 2017, 1:56 PM
#2084
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ceon URI Mapping v4.x

mc12345678:

So shouldn't the note above that code also be modified? Only remove trailing slashes on the home page? Currently as provided it only removes the trailing slash when on the home page and not on any other page whereas before it described that the trailing slash would be removed from all pages but the homepage, though it didn't specifically remove/account for the page being the homepage...

How does the change affect linked product if any by leaving the trailing slash followed by the '?' and master category?

Doh, I think I know the answer to the second question... Its a canonical link, the ? and master category should not be present, otherwise it wouldn't be canonical... Sorry.. :)

1 Mar 2017, 11:29 AM
#2085
bonheddwr avatar

bonheddwr

Zen Follower

Join Date:
Jun 2007
Location:
Cymru
Posts:
124
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

I have the News Box Manager installed on our site. Is there a way of integrating it with "Ceon URI Mapping" so that we can have for example: https://www.welsh-lovespoons.co.uk/news/lovespoons-booklet instead of ```
https://www.welsh-lovespoons.co.uk/index.php?main_page=more_news&news_id=2

1 Mar 2017, 12:12 PM
#2086
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ceon URI Mapping v4.x

bonheddwr:

I have the News Box Manager installed on our site. Is there a way of integrating it with "Ceon URI Mapping" so that we can have for example: https://www.welsh-lovespoons.co.uk/news/lovespoons-booklet instead of ```
https://www.welsh-lovespoons.co.uk/index.php?main_page=more_news&news_id=2


This type of action is covered in the documentation (at least it was way back in version 4.4.1) See section 10 of the configuration area.  ie: _docs/sections/configuration.html#uri-other-zen-cart-pages

More than likely you will want to apply the second method because of the news_id parameter.  If unable to find that information in the docs or unable to understand how to apply it, then please come back with more information about what has been attempted and what is not understood.
1 Mar 2017, 7:23 PM
#2087
mustang80 avatar

mustang80

New Zenner

Join Date:
May 2016
Location:
Bulgaaria
Posts:
28
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Very good module
I installed Ceon URI Mapping v4.x But my site is in Bulgarian and ignore the Cyrillic alphabet in generating url ....
I have a 9000 product there any option to generate automatically ie whole catalog ..

Version"1.5.5a

1 Mar 2017, 7:51 PM
#2088
mustang80 avatar

mustang80

New Zenner

Join Date:
May 2016
Location:
Bulgaaria
Posts:
28
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

The problem with Cyrillic resolved, but I can not generate the entire catalog automatically ...

1 Mar 2017, 8:43 PM
#2089
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

mustang80:

The problem with Cyrillic resolved, but I can not generate the entire catalog automatically ...

The module will not do this, there was a commercial (paid for) module from Ceon that would generate for existing URL's. I believe that someone who posted a couple of posts above has a module/tool that combines Ceon with Easy Populate if you're not able to purchase the original Ceon module.

8 Mar 2017, 6:23 PM
#2090
perfumbg avatar

perfumbg

Zen Follower

Join Date:
May 2010
Posts:
192
Plugin Contributions:
5

Re: Ceon URI Mapping v4.x

Hello, I have just fresh installed 155e and after few bugfixes already mentioned in the forum I found one more in CEON URI mappings module so I am sharing it here.

When I try to update/generate category or products mappings blank page apears. On the same server I have another 155d version with the exact same CEON module working.

My php Server is 7.1 and if I turn it back to 5.6 the URI mappings on my 155e seems to generate normaly.

And also this erro apears in the log

[08-Mar-2017 19:56:19 Europe/Sofia] PHP Fatal error:  Cannot use 'String' as class name as it is reserved in /home/xxxxxx/xxxxxxxxxxxx/includes/classes/class.String.php on line 57

Does anybody have the same problem?

8 Mar 2017, 7:04 PM
#2091
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ceon URI Mapping v4.x

Yes when using the version currently available for download from this site, but no when proper renaming is performed as implemented by torvista at his github location. String has become a reserved name and therefore can not be used as it is.

8 Mar 2017, 7:48 PM
#2092
perfumbg avatar

perfumbg

Zen Follower

Join Date:
May 2010
Posts:
192
Plugin Contributions:
5

Re: Ceon URI Mapping v4.x

Here is a link for sollution if needed!

https://github.com/torvista/CEON-URI-Mapping

Kind regards and many thanks to mc12345678!

9 Mar 2017, 7:14 AM
#2093
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

Note that the "string" name issue is one of several problems that crop up with php7.
The version in the Plugins section is now very much out of date.
My version has all these fixes already done and documented in the updated readme.

9 Mar 2017, 11:02 AM
#2094
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

torvista:

Note that the "string" name issue is one of several problems that crop up with php7.
The version in the Plugins section is now very much out of date.
My version has all these fixes already done and documented in the updated readme.

Steve would now be a good time to update the version in the plugins section?

10 Mar 2017, 10:17 AM
#2095
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

Steve would now be a good time to update the version in the plugins section?

Yes the code works fine, but putting the package up for public consumption means I should revise the documentation and the installation self-check routines to maintain the idiot-proofness.
I'll try and do it soon...

10 Mar 2017, 10:56 AM
#2096
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

torvista:

Yes the code works fine, but putting the package up for public consumption means I should revise the documentation and the installation self-check routines to maintain the idiot-proofness.
I'll try and do it soon...

That's great, I'm sure a lot of folks will appreciate that.

14 Mar 2017, 4:46 PM
#2097
pixelpadre avatar

pixelpadre

Suspended

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

Re: Ceon URI Mapping v4.x

richmandoo:

Hi, I am hoping some one would be able to help me.
I'm not aware of any changes to my site, but all of a sudden I was getting 404 errors on all of my product pages.
I ran the Ceon URI Mapping Installation check it came back with an error:

The file it is talking about is includes/functions/general.php, but all it says it make the modifications and doesn't tell me what is wrong or what the modifications are.
Does anyone have any idea?

Thanks!

I am getting the same error

A file requires 2 modifications to be made for it but none of the modifications have been made.

when I check the installation in admin with 4.5.2 on 155e. When you say install the original mod what exactly do you mean.

22 Mar 2017, 1:09 PM
#2098
bonheddwr avatar

bonheddwr

Zen Follower

Join Date:
Jun 2007
Location:
Cymru
Posts:
124
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

mc12345678:

This type of action is covered in the documentation (at least it was way back in version 4.4.1) See section 10 of the configuration area. ie: _docs/sections/configuration.html#uri-other-zen-cart-pages

More than likely you will want to apply the second method because of the news_id parameter. If unable to find that information in the docs or unable to understand how to apply it, then please come back with more information about what has been attempted and what is not understood.

Hi, thank you very much. I have followed the doumentation and I've managed to do this in Cpanel. The only issue I have is when switching languages:

For example https://www.welsh-lovespoons.co.uk/news/stdavid , but when I click on the 'CYMRAEG' link to visit the Welsh language page the URL is https://www.llwyaucaru.com/newyddion/dewisant?main_page=more_news&news_id=5&language=cy instead of just https://www.llwyaucaru.com/newyddion/dewisant

Also if the ID is changed it takes you to a different story for example - https://www.llwyaucaru.com/newyddion/dewisant?main_page=more_news&news_id=4&language=cy

Is there a way to change this so that ?main_page=more_news&news_id=* never appears in the URL (similar to what happens with EZPages)? Let me know if this isn't clear. Thank you so much for any advice.

22 Mar 2017, 4:00 PM
#2099
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Ceon URI Mapping v4.x

bonheddwr:

Hi, thank you very much. I have followed the doumentation and I've managed to do this in Cpanel. The only issue I have is when switching languages:

For example https://www.welsh-lovespoons.co.uk/news/stdavid , but when I click on the 'CYMRAEG' link to visit the Welsh language page the URL is https://www.llwyaucaru.com/newyddion/dewisant?main_page=more_news&news_id=5&language=cy instead of just https://www.llwyaucaru.com/newyddion/dewisant

Also if the ID is changed it takes you to a different story for example - https://www.llwyaucaru.com/newyddion/dewisant?main_page=more_news&news_id=4&language=cy

Is there a way to change this so that ?main_page=more_news&news_id=* never appears in the URL (similar to what happens with EZPages)? Let me know if this isn't clear. Thank you so much for any advice.

The entry that was made to provide /news/stdavid (or perhaps just /stdavid) was a single datapoint. For each different arrangement to be used, a different datapoint must be applied. As pointed out ezpages permit such an action of storing the uri that is generated, but you may notice that for each language there is a field in which to fill in or permit auto-generation of the URI. So, if you have two languages for the "same" news_id, then there will need to be two uris provided/two database entries. Now, I don't exactly get/understand how/why one is redirected away from the current domain name and further what would be involved to ensure that the receiving domain name is able to be in sync, but whatever is used to accomplish that must also take into account what is being entered from this site to get to the other site.

As to "if the ID is changed" I am not sure what you mean. Do you mean if one types in a different news_id, or do you mean that if the article is moved from one news_id to another. If the article is moved, I would say that is not a good process, regarding trying to use a different news_id to see different news, well that's back to the above about assignment of one datarow for each unique condition/object.

So as to the language_id that should be used, that can be found in the admin->localization->languages area associated with each language that is installed.

28 Mar 2017, 3:24 PM
#2100
ehswift avatar

ehswift

New Zenner

Join Date:
May 2008
Location:
Amarillo, TX
Posts:
39
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

perfumbg:

Here is a link for sollution if needed!

https://github.com/torvista/CEON-URI-Mapping

Kind regards and many thanks to mc12345678!

Were you able to get this to work properly with Zen Cart v1.5.5d or v1.5.5e? If so, which one were you able to get it work with?