• Home
  • Get help
  • Ask a question
Last post 2 hours 8 min ago
Posts last week 81
Average response time last week 4 hours 29 min
All time posts 67929
All time tickets 10501
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.

#6850 – How can I set up URL optimization to ignore anchor links?

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.
Saturday, 04 January 2020 01:01 UTC
superSkies
We use one page layouts. Anchor link from a menu lands to appropriate section of that page.
For example, clicking on about > contact menu goes to about#contact section, and clicking on about goes to the same about page (no #). Enabling sh404SEF URL Optimization seems to remove these anchor links.

How can I configure sh404SEF not to do that?

Our site is https://xxxx.org/ You can click on the About section to see anchor menus.

Thanks!
Monday, 06 January 2020 09:53 UTC
wb_weeblr
Hi

sh404SEF does not alter anchors in links, it actually a fairly common situation.

How are those links created in your menus? Are those "just" Joomla menu items? of which type? what exact URL did you enter in the Joomla menu item input field?

Best regards
 
Monday, 06 January 2020 16:40 UTC
superSkies
Yep, I was surprised to get the error too. It's probably because I have the menus setup in a weird way but I'm not sure how to do this without using the URL.
The menus are setup as Type: URL
Link: about#welcome (to load https://www.xxxx.org/about#welcome)

Here is a screen shot. When I enable sh404SEF that menu item stops working and I get 404.

Tuesday, 07 January 2020 07:22 UTC
wb_weeblr
Hi

I don't see how the anchor can have anything to do with it. What about the about URL. Does that work if you enter in your browser address bar? is this URL found in the SEF URL manager?

I suspect the URL of that page is simply not "about" anymore.

Best regards
 
Tuesday, 07 January 2020 14:51 UTC
superSkies
Yes, everything is working fine until we "Enable URL optimization". This is the only reason why I wanted to use sh404SEF.
If we can't get it working, can I get a refund?

To answer your questions.

No, the URL is not found in the SEF URL manager.
How can you create a non-SEF url when there is no index.php?
I looked in the SEF URLs and it's a complete mess -- e.g. about/about etc. I don't have the time to add manually every menu and item, it's hundreds of items. Is it possible to generate those automatically?
Tuesday, 07 January 2020 15:38 UTC
wb_weeblr
Hi

This is the only reason why I wanted to use sh404SEF.
Not sure I follow you. Why do you want to use sh404SEF for? if it works without sh404SEF and if you it breaks when you enable it, why do you enable it?

No, the URL is not found in the SEF URL manager
That's the problem: if a URL is not in the URL manager, it's a 404. per what you saiy later on, I think the actual URL for that page is about/about (more on this below).

Is it possible to generate those automatically?
When URLs are created following Joomla API, SEF URLs are created automatically. Nobody would want to enter URLs manually. In your case, the URL has been created automatically, it's just not about, it's more likely to be about/about (again, see below).

I looked in the SEF URLs and it's a complete mess -- e.g. about/about etc
There is no mess. It's totally ordered, it's just not the same ordering as Joomla. To put it shortly, one of sh404SEF feature is that it tries to solve one of the big SEO issue with Joomla SEF URLs: duplicates.

To achieve that, it does not use menus at all to build URLs. So whatever your menu items aliases are, they are totally disregarded when creating URLs.
We use a more standard practice for URLs, namely that one piece of content has one single URL, independently from where it's linked to.

By default, a link to an article is created as /category-alias/article-alias which probably is why you are seeing about/about as the URL for that page. Is this correct? is that "Article" located inside a "About" category?

If yes, you can do many things:

- if there are just a few URLs you want to change, just click on them in the SEF URL manager and change them to what you want (doc)
- if you want to change URLs structure for all URls, ie when they are automatically created, you can adjust the settings under Extensions -> Joomla

Once you confirm where you stand exactly, we can get into details if needed.

Best regards
 
Tuesday, 07 January 2020 20:02 UTC
superSkies
Thanks for taking time to explain all that.

The main reason why we wanted to use the sh404SEF is the following. When editors link to a blog/article, the editor on the back-end links to things that look like this: /?view=article&id=139&catid=8 I wanted those system links automatically changed regardless how the (silly) editor on the back-end changes the SEF. sh404SEF seems to do this perfectly, the /?view=article&id=139&catid=8 is changed to /new/the-article-title

The only problem is that when I enable sh404SEF most links and even main menu items break (e.g. about)

After you first message I added manually "about" in SEF URLs section and that seemed to fix the issue for that particular link.
However, we have dozens of menus and many other article links all over the site. I can't add them all. It would take a long time and even then I'm not sure if I would get them all.

Would you be comfortable if I send you admin login for the site for you to review the settings? I don't know if there is a secure way to share login with you or if there is a better/faster way around this. You can reproduce this easily by Enabling URL optimization, and clicking on the "about" which is the first main menu at the top of the site.

I'm sorry to take so much of your time.
Wednesday, 08 January 2020 00:17 UTC
superSkies
Now that I had a chance to think about this a little I think the issue for us is that we use a lot of element ID's to anchor to certain portion of a page, sometimes in main menus and a lot in articles with hyperlinks (e.g. about#welcome). I don't think those are created automatically in sh404SEF. What would be the best workaround for that? I can't add those in SEF URL manager. We have hundreds of links like that, it would take too much time and I would probably miss half of them by entering them manually.

I don't need this but FYI, trying to generate Google Analytics token errors out with "Sign in with Google temporarily disabled for this app
This app has not been verified yet by Google in order to use Google Sign In."
Wednesday, 08 January 2020 16:48 UTC
wb_weeblr
Hi

I don't think those are created automatically in sh404SEF. What would be the best workaround for that?
This is totally unrelated to the problem. Anchors are unrelated to the problem I mean.

If you look at /about#welcome, #welcome has not bearing on whether the page is a 404 or not. What decides if the page generates a 404 is whether /about exists or not.

In your case, and as outlined above, /about does not exist because the URL for that page is likely /about/about, when automatically created (this can be configured).

After you first message I added manually "about" in SEF URLs section and that seemed to fix the issue for that particular link.
You should not create URLs manually. This is not needed and adds to the confusion I think.

Would you be comfortable if I send you admin login for the site for you to review the settings? I don't know if there is a secure way to share login with you or if there is a better/faster way around this. You can reproduce this easily by Enabling URL optimization, and clicking on the "about" which is the first main menu at the top of the site.
That can be done here, this is secure area. However that should not be the next step.

It is important that you understand and acknowledge what I have tried to explain thus far: I suggest we focus on one single URL, the /about page (please entirely forget the anchor here, it is strictly unrelated to your problem).

This is the key point:

> By default, a link to an article is created as /category-alias/article-alias which probably is why you are seeing about/about as the URL for that page. Is this correct? is that "Article" located inside a "About" category?

Once I have a reply to this, we can move forward.

Best regards


 
Wednesday, 08 January 2020 17:54 UTC
superSkies
Thanks again for your patience.


Yes. 404 messages for about and about#welcome are for an article called about that is in the About category.
About menu is linked to About article in About category. Welcome menu is URL link to about#welcome

When enabled I get 404 by clicking on /about and /about#welcome on the main menu.
Yes. You are correct, when sh404SEF is enabled I can access /about and /about#wlecome if I manually type about-us/about or about-us/about#about
These links are not create automatically by sh404SEF. I have to manually enter about-us/about. Just clicking on the about main menu errors out to 404.

Just to test I created a SEF URL like below

New SEF URL: about#welcome
non-SEF url: index.php/?option=com_content&view=article&id=31#welcome

This seems to work and redirects perfectly. You said not to create links manually, so I'm curious what is the best way to proceed. Maybe changing menu links that I have now and have sh404SEF handle it automatically?

from this


to this



Some unrelated things that I would like to resolve later and are probably just user errors on my end are:

1) We have some menu item aliases (not main menu) that we would like to keep, these (e.g. /writing) become unavailable when I enable sh404SEF and I don't know how to go around that.


2) Meta description is not generated by sh404SEF. All I see for any article is Site Meta Description from joomla config.

3) Google auth not working, it would be nice if we could get that authenticate and charts in the site.


Thursday, 09 January 2020 17:44 UTC
wb_weeblr
Hi

Yes. You are correct, when sh404SEF is enabled I can access /about and /about#wlecome if I manually type about-us/about or about-us/about#about

These links are not create automatically by sh404SEF. I have to manually enter about-us/about. Just clicking on the about main menu errors out to 404.
The y should be created automatically. If not then something is wrong. Most common reasons:

1 - The /about URL you created prevent the creation of the normal one. I would really suggest you delete all the URLs you created manually, this adds confusion. I
2 - You have some caching enabled on your Joomla site, either in Global configuration or using the Joomla system cache plugin.

I would suggest:

1 - Purge URLs in sh404SEF URL manager
2 - Delete all the custom URLs you created
3 - Clear all Joomla caches
4 - Enable back URL optimization
5 - Visit your home page.

That /about/about URL should be created automatically when you visit your home page. This is because you have a menu item which is a "Single article" link to the About Article in the About category.

Just to test I created a SEF URL like below



New SEF URL: about#welcome

non-SEF url: index.php/?option=com_content&view=article&id=31#welcome



This seems to work and redirects perfectly. You said not to create links manually, so I'm curious what is the best way to proceed. Maybe changing menu links that I have now and have sh404SEF handle it automatically?
No, please do not change your menus in any way. Something else is happening in what you do, we need to start from a fresh state and work from there.
Also, when you create SEF URLs such as this one (but please do not do that right now), do not include the anchor, ie #welcome. Anchors are not part of URLs, they are local to the page. The real URL is /about. That's one needs to be created and stored in the database (automatically or not).

Once we get you to create the about/about URL, then we'll change the sh404SEF settings to the effect that the URL created (automatically) is about instead of about/about.

Some unrelated things that I would like to resolve later and are probably just user errors on my end are:
I would strongly suggest you open a separate ticket for that, or else we'll have more confusion here and that won't help. All of them are simple things, just need to be understood.

The only real issue here is about the Analytics auth. We're in the middle of an issue with Google where they want to review all apps that access Analytics (or other types of Google data) and basically they do not have a validation process that works for apps such as sh404SEF (which are not installed on one single domain but instead which customers install on their own website). So it will take a little while before sh404SEF is validated again for that - not easy to talk to google actually.

Best regards



 
Thursday, 09 January 2020 22:29 UTC
superSkies
Success! I did those 5 steps and clicking on about main menu now works. I'm redirected from (the old /about) to /about-us/about
I will wait for further instructions on how to change the sh404SEF settings to the effect that the URL created (automatically) is about instead of about/about.
Friday, 10 January 2020 07:44 UTC
wb_weeblr
Hi

OK good. So now:

- go to sh404SEF configuration, Extensions -> Joomla:


- change that setting to "None" so that articles have no category in their links. Ie instead of /category-alias/article-alias, sh404SEF will use /article-alias directly
- Purge URls
- Visit the home page

The About link in the main menu bar will now work as /about.
At the same time, your other menu item, /about#welcome will also work normally. This is because /about#welcome, when clicked, tells the browser to do the following:

a/ request the /about page from the server (ie your Joomla site)
b/ when the server, your Joomla site, has sent the content of the About page, search for the #welcome anchor and scroll down to it

The server is unaware of the fact you requested a specific anchor. That's just happening in the browser only ever requests the /about page to Joomla.

Best regards

 
Friday, 10 January 2020 15:23 UTC
superSkies
Everything is working. If I just followed directions I could have saved you tons of time.
I'm sorry and thank you again for all your help and patience.

I have one glitch in Yootheme Builder. When I try to edit any page I get redirected to homepage.
This is probably some kind of exception that I have to add somewhere in sh404SEF.
I had this with another extension and I had to add POST, SITE, RETURN exceptions for com_ajax, com_content.
404 Request is listed as SEF url: index.php
I'm not using security functions.

Editing a page in Yootheme builder loads a preview in a URL like this:
 open [02/Jan/2020:10:22:33 -0700] "GET /administrator/index.php?p=customizer&option=com_ajax§ion=builder&site=%2Findex.php%3Foption%3Dcom_content%26view%3Darticle%26id%3D143%26catid%3D11%26Itemid%3D283&return=https%3A%2F%2Fwww.xxxx.org%2Fadministrator%2Findex.php%3Foption%3Dcom_content%26view%3Darticle%26layout%3Dedit%26id%3D143 HTTP/1.1" 200 765378 "https://www.xxxx.org/administrator/index.php?option=com_content&view=article&layout=edit&id=143" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36"

Friday, 10 January 2020 17:50 UTC
superSkies
Please ignore my previous message. The error caused elsewhere, a custom plugin. It's all good.

THANK YOU AGAIN!
Monday, 13 January 2020 12:03 UTC
wb_weeblr
Hi

You're very welcome and glad it's all sorted out! Closing this ticket now, feel free to open a new one as needed. If you do so, please mention this ticket number in the new one.

If you created any superadmin account for us, be sure to delete or block it now to avoid unnecessary risk in the future.

And please feel free to post a review on the JED,it helps and we appreciate it!

Best regards

 
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.