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

Ceon URI Mapping v4.x

Views: 451,770

Results 61 to 80 of 2,454
20 Sep 2011, 09:01
#61
rebelit avatar

rebelit

New Zenner

Join Date:
Aug 2011
Location:
Brighton UK
Posts:
27
Plugin Contributions:
0

Ceon URI Mapping v4.x

conor:

Yes, the standard edition of the software has no interface for creating URI mappings for define pages. You can easily add them manually using the instructions in the configuration documentation.

ah I was looking for "define pages" but I guess the "any other page" stuff is what is relevant - thanks

conor:

EZ Pages can no longer use internal links whenever you are using Ceon URI Mapping. You must remove the internal links from your site. You don't need them any more, internal links were just a kludge for Zen Cart's lack of static URI support, you can just use static URIs instead.

The only reason I use the redirect on a couple of pages is to take advantage of the override system for define pages. There doesn't seem to be an easy way to specify javascript & css for individual EZ pages.

It also stops the client messing with the layout (the define pages editor scares them away) and messing up the js code.

Is it simply not possible to have a nice internal link arrive at the custom define page?

Thanks,
Reb

20 Sep 2011, 09:30
#62
rebelit avatar

rebelit

New Zenner

Join Date:
Aug 2011
Location:
Brighton UK
Posts:
27
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

rebelIT:

ah I was looking for "define pages" but I guess the "any other page" stuff is what is relevant - thanks

I must be being stupid, I can't seem to get this to work.

I want to map
/about-us

to

/index.php?main_page=about_us

When entering a record into the ceon_uri table..

URI = /about-us
language_id = 1
current_uri = 1
main_page = I'm not sure what to enter here I have tried
index
main_page
index.php?main_page=about_us
/index.php?main_page=about_us

and NULLS for
qs params, associated_db_id, alternate_uri and left the redirection code as default

I noticed the records that were created through the admin interface automatic method do have integer values in the associated_db_id field

20 Sep 2011, 10:05
#63
rebelit avatar

rebelit

New Zenner

Join Date:
Aug 2011
Location:
Brighton UK
Posts:
27
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

neekfenwick:

I've just spent some time debugging this and thought I'd post here to help others in the same situation. If I've missed documentation covering this, please accept my apologies. If I haven't missed docs, please add some to this effect :) it would have saved some head scratching. This is pretty simple stuff, but hard to get into as a newcomer to the URI Mapping mod.

We have a custom product type "product_light" which was created following the standard Zen Cart approach of copying an existing product type, in my case the product_music files, and hacking the custom attributes to our requirements.

1/ We therefore have a custom admin/includes/modules/product_light/update_product.php, so the update_product action causes this update_product.php to be executed when saving changes to products, due to the code in admin/product.php that runs your custom update_product.php if it exists. So we have to copy the CEON modifications from admin/includes/modules/update_product.php to make any URI mappings be saved to the database. There's only one block, marked with "CEON URI MAPPING 1 of 1".

2/ We need a constant for our product type filename, just so we don't have to hardcode the string anywhere, so in includes/extra_datafiles/our_custom_stuff.php we include:

define('FILENAME_PRODUCT_LIGHT_INFO', 'product_light_info');

> I am not clear whether this needs doing for admin/includes/extra_datafiles/our_custom_stuff.php also.
> 
> 3/ Update includes/classes/class.CeonURIMappingHREFLinkBuilder.php to ADD line 238:
> ```
$main_page == FILENAME_PRODUCT_LIGHT_INFO ||

4/ Update includes/classes/class.CeonURIMappingHandler.php to ADD line 442:

			$_GET['main_page'] == FILENAME_PRODUCT_INFO ||
> and line 513:
> ```
						$_GET['main_page'] == FILENAME_PRODUCT_LIGHT_INFO ||

5/ Update admin/includes/classes/class.CeonURIMappingAdminProductPages.php to ADD line 940:

			FILENAME_PRODUCT_LIGHT_INFO,
> and line 1436:
> ```
				FILENAME_PRODUCT_LIGHT_INFO,

With these modifications in place, the URI mappings for our custom product types seem to work.

In summary, it would be nice if some of theses lists of FILENAME_* constant usages were driven by the product_types database table, if possible, as that would reduce the necessity to hardcode these lists of known product types, but perhaps it isn't that simple.

Thanks for these instructions.

It's worth noting that if your custom product also uses a custom update_product.php file you will need to incorporate the one CEON block from the general update_product.php file.

20 Sep 2011, 10:42
#64
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Ceon URI Mapping v4.x

Hi,

Lots of posts there!

rebelIT:

I must be being stupid, I can't seem to get this to work.

The only thing you got wrong was the value of the main_page variable.. I guess you just didn't read the instructions right.

It should be

about_us

All the other values were correct.

You must also set date_added (e.g. to NOW() in the select gadget in PHPMyAdmin).

rebelIT:

Is it simply not possible to have a nice internal link arrive at the custom define page?

Just code your site/template so that the links go straight to the pages you want.

All the best...

Conor
ceon

20 Sep 2011, 11:24
#65
rebelit avatar

rebelit

New Zenner

Join Date:
Aug 2011
Location:
Brighton UK
Posts:
27
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

conor:

Hi,
Lots of posts there!

I'm being hassled to get this done ASAP - I just want to have a lie down really!

conor:

The only thing you got wrong was the value of the main_page variable.. I guess you just didn't read the instructions right.

It should be

about_us

All the other values were correct.

You must also set date_added (e.g. to NOW() in the select gadget in PHPMyAdmin).

Unfortunately that isn't working either. I thought it might be because about_us define page is a custom added define page.

So I tried it with the site_map which is one of the predefined pages with the following values..

/site-map 1 1 site_map NULL 0 NULL 301 2011-09-20 11:53:11

but it doesn't work either. I also tried it with the contact_us page.

Wierdly everything else works - categories, custom products, normal products, review pages, tell a firend etc...

I have checked that information.php isn't using anything hardcoded & that URI mapping doesn't add to or replace that sidebox

conor:

Just code your site/template so that the links go straight to the pages you want.

That's a good pragmatic solution if I can get the mapping to the define pages working. :yes:

20 Sep 2011, 13:00
#66
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Ceon URI Mapping v4.x

Hi,

rebelIT:

Unfortunately that isn't working either. I thought it might be because about_us define page is a custom added define page.

I forgot that about_us isn't a standard "other" page.

It should stil work though.

rebelIT:

/site-map 1 1 site_map NULL 0 NULL 301 2011-09-20 11:53:11

but it doesn't work either. I also tried it with the contact_us page.

The zero is the problem. It should be NULL. That's where you've been going wrong. associated_db_id can't have a value other than NULL for anything except categories, products, manufacturers or ez-pages.

All the best..

Conor
ceon

20 Sep 2011, 13:59
#67
rebelit avatar

rebelit

New Zenner

Join Date:
Aug 2011
Location:
Brighton UK
Posts:
27
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Hi Connor,
I did originally enter a NULL for that field but the DB structure wasn't configured to allow a NULL so it changed it to a zero

I have now changed the three examples so that the associated_db_id field is NULL

The define pages links are still the dynamic links.

If I manually enter the URL I am trying to map it redirects straight to the index page (no 404)

everything else works perfectly, including the 5 custom products I have defined.

I know you said the associated_db_id field isn't used, but all the entries in the ceon_uri_mapping table generated by the admin interface do actually have a range of integer values entered into that field.

cheers,
Reb

20 Sep 2011, 14:17
#68
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Ceon URI Mapping v4.x

Hi,

rebelIT:

I did originally enter a NULL for that field but the DB structure wasn't configured to allow a NULL so it changed it to a zero

Then you messed up the installation. That field MUST be NULL, the software is designed to look for NULL speifically, not for zero.

rebelIT:

I have now changed the three examples so that the associated_db_id field is NULL

The define pages links are still the dynamic links.

If I manually enter the URL I am trying to map it redirects straight to the index page (no 404)

Really sorry but you've done something wrong and I have no time to help here.

I wish you luck in finding out what you've done wrong and getting things fixed.

Certainly first things first, fix your db schema.

rebelIT:

I know you said the associated_db_id field isn't used, but all the entries in the ceon_uri_mapping table generated by the admin interface do actually have a range of integer values entered into that field.

You misread what I wrote. It isn't populated for those pages, it's used by products etc. For those other pages it MUST be NULL.

I'm afraid as as this is a problem on your server and because I'm under terrible time constraints, I can't post here further about this.

All the best..

Conor
ceon

20 Sep 2011, 15:35
#69
ehswift avatar

ehswift

New Zenner

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

Re: Ceon URI Mapping v4.x

OK, I have installed Ceon URI on my site and I am trying to decide which URL format will help me get better search engine rankings. Please look at the 4 examples below and tell me which one you believe to be the best and if possible, explain why you feel that way.

**If you can't see all of the URL, just hover over it and look at the bottom of your browser for all of it. I am not sure why the whole thing does not show up. **

The number "22011", listed in the last two examples is a product model number. How important is it to include this in the URL?

Additional Information: This may help you decide. I read that shorter URL's are better and easier to remember, but what I really need to know is whether or not including a key-word rich category in the URL will boost my search engine rankings. Please look at a competitors site here to see there format: http://www.giftmood.com/p-14312/Disney+Fiber+Optic+Pens.html

You will notice in the example above that they don't include the category in the listing, but do include the product model number and they append .html on the end of the URL. They also rank #1 for the term wholesale gifts. Is there any connection with this and their URL naming structure?

Also will appending .html on the end of the URL boost rankings at all? If not, why do webmasters do this?

I know that I have asked a lot of questions here, but I am little confused as to which URL format will be most effective and just wanted to get some expert input before I launch the site.

Thank you for taking the time to answer them.

20 Sep 2011, 15:44
#70
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Ceon URI Mapping v4.x

Hi,

ehswift:

Also will appending .html on the end of the URL boost rankings at all? If not, why do webmasters do this?

Lack of knowledge simply. .html is no longer useful or applicable for URIs.. Tim Berners-Lee, creator of the world wide web, advises against their use and I agree.. the technology used to generate a URI shouldn't be part of the URI itself.

As for your other questions, my quick two cents.. product model number is a waste of time unless people search by model number, categories potentially useful as full of keywords.. but have to be careful not to make them too long.

Whether or not words nearer the start of a URI are given more significance I don't know. It's not something I find important to be honest.

That's all from me, hope that helps.

All the best...

Conor
ceon

20 Sep 2011, 16:00
#71
rebelit avatar

rebelit

New Zenner

Join Date:
Aug 2011
Location:
Brighton UK
Posts:
27
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Hi Connor,
I discovered what the problem I was having was.

in phpMyAdmin I was actually entering NULL in the field rather than checking the check box for null.

I guess the typed in chars NULL was interpreted as a string & being invalid for the field converted to 0

:oops:

It all works perfectly now. It is a really great plugin.

Sorry for needlessly taking up your time.

As soon as I get paid for this job I'll be donating.

Thanks :clap:

Ps and next time I'll install the plugin before the client adds 1200 products d'oh!

20 Sep 2011, 16:06
#72
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Ceon URI Mapping v4.x

Hi,

rebelIT:

in phpMyAdmin I was actually entering NULL in the field rather than checking the check box for null.

Ah, that explains things.. I couldn't understand how you could end up with a database table created that didn't default to NULL for the associated_db_id column unless you'd manually created the db columns yourself. That wasn't the problem because it didn't happen!

Glad you are sorted now.

All the best...

Conor
ceon

20 Sep 2011, 16:27
#73
old_iron avatar

old_iron

New Zenner

Join Date:
Sep 2011
Posts:
3
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Hi. I'm using Zen Cart 1.3.8 and have installed this Module. I've got it set up and working almost perfectly (Thank you CEON for making such a great module).

However, there is one (BIG) issue that has caused me to have to turn the module off for the time being. None of the form on the site work when the module is turned on. Login, add to cart, retrieve password, etc. When any of those are submitted, the page just reloads. Almost as if it didn't get the POST, although I can see the post being sent correctly. The target URL of the forms are all being set correctly by the module.

Aside from that, all of the rewritten URL's work fine on the site.

Have you heard of any instances of this happening before as well as any suggestions on how to fix it?

Thank you.

20 Sep 2011, 17:09
#74
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Ceon URI Mapping v4.x

Hi,

Glad you like the software.

old_iron:

None of the form on the site work when the module is turned on.

This means that you are posting to the wrong URI and it is being redirected. (Although version 4 shouldn't redirect after a post).

Are you using an older version than 4.0.3?

If not, chances are you have a broken rewrite rule in your .htaccess file which is redirecting from www. to not www. or vice versa.

Make sure that your HTTP_SERVER values etc. are set correctly to match any www. redirection stuff you may have in your .htaccess file.

E.g. stuff like the following may be conflicting:

RewriteCond %{http_host} ^yourdomain.co.uk
RewriteRule ^(.*) http://www.yourdomain.co.uk/$1 [R=301,L]

Or remove all rules from your .htaccess file except Ceon URI Mapping to check.

Hope that helps.

All the best...

Conor
ceon

20 Sep 2011, 20:02
#75
old_iron avatar

old_iron

New Zenner

Join Date:
Sep 2011
Posts:
3
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

conor:

Are you using an older version than 4.0.3?
I'm using 4.0.3

conor:

If not, chances are you have a broken rewrite rule in your .htaccess file which is redirecting from www. to not www. or vice versa.

Make sure that your HTTP_SERVER values etc. are set correctly to match any www. redirection stuff you may have in your .htaccess file.

E.g. stuff like the following may be conflicting:

RewriteCond %{http_host} ^yourdomain.co.uk
RewriteRule ^(.*) http://www.yourdomain.co.uk/$1 [R=301,L]

Or remove all rules from your .htaccess file except Ceon URI Mapping to check.

I only have a couple other rules in my .htaccess file other than the CEON ones. Those couple rules don't have anything to do with www redirection or enforcement. My store is set up with the www, and the settings in the zen config file reflect this.

I just turned the module back on and used HTTPLiveHeaders to see what headers are being returned. I've got my Login page set up here: http://www.mydomainname.com/login

Here's the headers when I submit the login form when the module is enabled:

http://www.mydomainname.com/login?action=process

POST /login?action=process HTTP/1.1

Host: https://www.mydomainname.com

User-Agent: Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip, deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Connection: keep-alive

Referer: http://www.mydomainname.com/login?action=process

Cookie: removed by me

Content-Type: application/x-www-form-urlencoded

Content-Length: 110

email_address=[email protected]&password=bleh&securityToken=12345&x=42&y=10

HTTP/1.1 404 Not Found

Date: Tue, 20 Sep 2011 19:51:49 GMT

Expires: Thu, 19 Nov 1981 08:52:00 GMT

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

Pragma: no-cache

Keep-Alive: timeout=15, max=90

Connection: Keep-Alive

Transfer-Encoding: chunked

Content-Type: text/html; charset=iso-8859-1

When I disable the module, the form submission works fine. This happens for any form on the site.

As you can see the server is replying with a 404, which is wierd since the current page is the same as what it's posting to. Help!

20 Sep 2011, 20:48
#76
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Ceon URI Mapping v4.x

Hi,

old_iron:

As you can see the server is replying with a 404, which is wierd since the current page is the same as what it's posting to. Help!

Send me
FTP and admin details for the site within the next 12 hours and I can take a look.

All the best...

Conor
ceon

20 Sep 2011, 21:18
#77
old_iron avatar

old_iron

New Zenner

Join Date:
Sep 2011
Posts:
3
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

conor:

Hi,

Send me
FTP and admin details for the site within the next 12 hours and I can take a look.

All the best...

Conor
ceon

Conor,

I don't think my client will allow that, no offense. Do you have any ideas that I could try? We really want to use this plugin, if only I could figure out why it's giving a 404.

20 Sep 2011, 23:22
#78
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Ceon URI Mapping v4.x

Hi,

old_iron:

Conor,

I don't think my client will allow that, no offense. Do you have any ideas that I could try? We really want to use this plugin, if only I could figure out why it's giving a 404.

Tough luck for the client then!

Sorry.

(No offense taken but I simply don't have time to help in any other way.. maybe someone else can).

All the best..

Conor
ceon

20 Sep 2011, 23:52
#79
akrogers avatar

akrogers

New Zenner

Join Date:
Feb 2011
Posts:
6
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

I'm having a problem getting a 404 error when using GoDataFeed's php script which is supposed to get our product information. I updated to the latest version of CEON Uri mapping (v. 4.0.3), but that didn't take care of it. I also temporarily deleted the .htaccess to see what would happen, but no success. I did use to have the WOZ mod installed, but removed it completely and still not luck. GoDataFeed has no idea, so I thought I'd ask here. Is there some kind of exclusion I should have somewhere for their script? Thanks so much for any help you can offer!

20 Sep 2011, 23:59
#80
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Ceon URI Mapping v4.x

Hi,

akrogers:

I'm having a problem getting a 404 error when using GoDataFeed's php script which is supposed to get our product information. I updated to the latest version of CEON Uri mapping (v. 4.0.3), but that didn't take care of it. I also temporarily deleted the .htaccess to see what would happen, but no success.

Try switching off Ceon URI Mapping and seeing if there is still a problem (Option in configuration menu).

I do have a small bug fixed in version 4.0.4 which may cause such behaviour (file being included when it should be excluded).. however, this ONLY affects very specific server configs (so far Apache on a local Windoze test server.. not on Linux).

If after switching off Ceon URI Mapping there is still a problem then I'm afraid then you've ruled out Ceon URI Mapping as being the source of the problem and would be better posting in GoDataFeed's thread.

All the best..

Conor
ceon