• Home
  • Get help
  • Ask a question
Last post 1 hour 8 min ago
Posts last week 94
Average response time last week 34 min
All time posts 67850
All time tickets 10486
All time avg. posts per day 20

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#1052 – non-sef urls

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Thursday, 24 September 2015 12:02 UTC
Webkonsulenter.dk
Hi!

I run Joomla 3.4.4, VM 3.0.10 and sh404sef 4.6.0.2718.

The Virtuemart buy popup modal is redirecting my (/no) user to:
https://www.xxxx.com/index.php?option=com_virtuemart&view=cart&lang=no

I already have a SEF URL for my (/no) cart at https://www.xxxx.com/no/din-handlekurv

I cannot add "index.php?option=com_virtuemart&view=cart&lang=no" as a +new URL because of "Could not save data. Error: This URL already exists in the database!".

How do I search backend for the non-sef URL to locate it ?

How do I add the new non-sef url to my already prefered SEF entry (din-handlekurv) ?

Thank you for your great plugin,
Thursday, 24 September 2015 12:18 UTC
wb_weeblr
Hi

Thanks for your kind words!

As sh404SEF, that URL is already in the database, you cannot add it and there is no need to add it, precisely because it's already there.

Most ilkely, the problem is not that it's not there, but simply that VM does not use the SEF URL, they forgot to transform it to SEF.

I have not been able to test on your site. I added a product to cart, but then was not able to view the cart content or anything. There are multiple javascript errors happening on the site at the moment, preventing proper operation.
You may be working on it right now?

Rgds

 
Thursday, 24 September 2015 12:32 UTC
Webkonsulenter.dk
Thanks for your reply.

I was not prepared for a rapid reply and was testing ScriptMerge :) Now I have disabled it again and javascript should run fine. Please test again.

I still need help with understanding the logic. I have a SEF cart for norwegian users: "no/din-handlekurv". This SEF url has two non-sef entries.

I also have a non-sef entry, that I would like to have redirected "index.php?option=com_virtuemart&view=cart&lang=no".

You tell me that the non-SEF url has been added to the database. Has it been added with a corresponding SEF url entry or is it in the db without an sef URL entry ?

To me the sh404sef interface suggests that there are shURLs assigned to unique SEF urls, which in turn have several non-SEF urls directing to them.

What I want is to simply add another non-SEF url to that list for my selected SEF url.

I have been using sh404sef for 3 years intensively and still do not understand it it seems. Maybe I should take a course or buy the book? ;)




Thursday, 24 September 2015 12:53 UTC
wb_weeblr
Hi

What you have to understand (but this is not about sh404SEF, it's just Joomla), is that SEF URLs are just pretty labels put on links. Joomla and all extensions only uses non-sef URLs.

An extension or joomla needs to display or redirect a URL, they build the target as a non-sef, for instance "index.php?option=com_virtuemart&view=cart&lang=no", and then before using it, either to be displayed or to trigger a redirect, they must pass it to a standard Joomla function called JRoute::_(), that transforms this non-sef into a SEF. The extension can simply then use the result for its purpose.

It's when Joomla or an extension calls that JRoute::_() function that sh404SEF can create a non-sef/sef pair and store it into database.

What I said earlier is that if Virtuemart is directly using "index.php?option=com_virtuemart&view=cart&lang=no" to trigger a redirect without asking Joomla (through the JRoute::_() function) to transform it into a SEF, then there's little we can do.

You tell me that the non-SEF url has been added to the database. Has it been added with a corresponding SEF url entry or is it in the db without an sef URL entry ?
As per the above, sh404SFE only adds non-sef/SEF pairs to the database.

I have a SEF cart for norwegian users: "no/din-handlekurv". This SEF url has two non-sef entries.
What are they?

I was able to see the "Add to cart" popup now, and I can absolutely confirm this to you: Virtuemart creates the links as non-sef URLs in the popup.
Normally, the "Add to cart" popup should display SEF links. That's VM responsiblity and is just an oversight on their part.

We can indeed add a redirect from https://www.xxxx.com/index.php?option=com_virtuemart&view=cart&lang=no to https://www.xxxx.com/no/din-handlekurv

A redirect is when to tell sh404SEF: if someone requests /some-page, trigger a 301 redirect to another page.

non-sef/SEF pairs stored in the database are not redirects. They are something used internally by Joomla an extensions to build the page content.

There are 2 ways to trigger such a redirect in sh404SEF:

- Enable the "301 redirect from non-sef to SEF" option under the "Advanced" tab of sh404SEF configuration: any non-sef url request on your site will be redirected to its SEF equivalent if they exist.
- Setup a redirect just for this non-sef (index.php?option=com_virtuemart&view=cart&lang=no): you do that by adding "index.php?option=com_virtuemart&view=cart&lang=no" as an alias to "no/din-handlekurv". See this page of documentation for background and method.


I think what you need to understand first is the difference between a redirect (browser requests one page, and joomla replies to go see another address) and a SEF URL (nice links inserted into the page instead of using the raw non-sef URL)

Rgds


 
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.