Hi.. I wish I could fix this.. Looks simply but I just can't find it..

When you have "registered users" only allowed to check out.. and you press the checkout button.. you are directed to this screen..

http://escapecme.com/cme/user?destination=cart%2Fcheckout

If one selects the "register" link you get "page not found" and the reason is.. the link is as follows..

http://escapecme.com/cme//cme/user/register?destination=cart%2Fcheckout

Well.. I am no programmer.. But I can tell something is wrong.

Path should be..http://escapecme.com/cme/user/register?destination=cart%2Fcheckout

but instead we get.

http://escapecme.com/cme//cme/user/register?destination=cart%2Fcheckout

which leads to "page not found"

HELP! (thx)

Comments

briandelicata’s picture

Have the exactly the same issue.

Tpainton-1’s picture

This appears to be a simple syntax error.. The problem is that the tags are in the wrong spot and it's screwing up the URL. I could easily fix this problem but I can't find the right file to edit.. I have been scouring the .module files in the ecommerce directory searching for <em> but I have not been able to find it..

briandelicata’s picture

URL which shows up in Login or Register: http://www.mydomain.com/%3Cem%3E/user/register?destination=cart%2Fchecko...

Any help on which file needs to be changed will be greatly appreciated!

Tpainton-1’s picture

I found the link..

drupal_set_message(t('Login or register to continue the checkout process', array('%reg-link' => url('user/register', drupal_get_destination()))));

This is in cart.module.

The "register" link is the bad link..

Comeon people.. this is easy.. Someone with an inkling of programming skill can solve this one.. The url is damaged and looks like this..

www.mysite.com/cme//cme/link..

when it should look like this.

www.mysite.com/cme/link.

Out of time to mess with it anymore as I have to work to do but Ill work more tonight.. See what you can find briandelicata.

Tpainton-1’s picture

OOps.. let me list this again..

drupal_set_message(t('Login or <a href="%reg-link">register</a> to continue the checkout process', array('%reg-link' => url('user/register', drupal_get_destination()))));

where "register" is the bad link.

Thanks

briandelicata’s picture

Tpainton,

There are two instances when %reg-link is called - one is on line 380 and 418. What i cannot figure out is from where the is coming in the cart

Login or /user/register?destination=cart%2Fcheckout">register to continue the checkout process
briandelicata’s picture

oops - this is the link:

			    <div class="messages status">
Login or <a href="<em>/user/register?destination=cart%2Fcheckout</em>">register</a> to continue the checkout process</div>

Tpainton-1’s picture

What module is that paste from? cart.module? I cannot find that line anywhere.. When Search for <em> I get nothing back..

It should be obvious by now how rank an amature I really am!

briandelicata’s picture

The above code is what gets generated in the cart page but i could not find any reference to that line with <em> in all the ecommerce module(s) though the closest reference is in the cart.module.

Tpainton-1’s picture

Well.. darn.

Obvious problem is that the emphasis tags SHOULD NOT be part of the url. How they get there I have no idea. I thought maybe it was theme error but I get same bug with bluemarine as I do my other theme.

The second problem is that the url is constructed incorrectly. We have a directory included twice with an emphasis tag between it.

So basically url construction is redundant. Sounds easy to fix but I can't figure it out. In the mean time the module is useless when using flexible mode for user reg status (random vs. regged).

A very clear bug that seems to have a very easy answer.. too bad noone has taken time to solve it who knows an iota about it.

gordon’s picture

Version: 5.x-3.0 » 5.x-3.x-dev
Component: ---------- » cart
Status: Active » Fixed

This has now been fixed in dev and will be included in v4 and v3.1 which will be released soon.

briandelicata’s picture

Gordon - I still get the same error with 5.x-3.x-dev (April 3rd) release.

Tpainton-1’s picture

I think I fixed it.

Main forum reply to my question was...

t() is changed in v5. Evidently the % inserts the emphasis tags.. I changed % to !reg-link and now the url is correct and it seems to work.

Would really appreciate it if someone could verify and maybe we can close this?

briandelicata’s picture

Tpainton - which line did you change? Can you post the code?

Brian

briandelicata’s picture

Figured it out!

Replaced four instances of %reg-link to !reg-link in cart.module and it now works.

gordon’s picture

Give it a day or so and it should turn up in the tar files.

I am going to be releasing v3.1 in the next couple of days.

Anonymous’s picture

Status: Fixed » Closed (fixed)