Better Preview

Better Preview vs SH404SEF problem!

2 years 2 months ago #81220

Sukinoz's Avatar Sukinoz

Hello Peter,

After several weeks looking to solve a problem with SH404SEF and a multilanguage site... When I didnt know what else to check... JUST UNINSTALL "BETTER PREVIEW" AND THE PROBLEM DISSAPEARS (and just reinstall and problem come again...)

maybe it is a sh404sef problem, i dont know.

The problem was that sh404sef were creating SEF-URL for articles associated to a wrong menu itemid (the default one), and also the correct url (but as a duplicated). So, the modules were not displayed correctly.

I share you the video:
drive.google.com/file/d/1VYtR1r0laQFS0mnfKRYpPqSlH-JhzIy0/view

hope it helps

2 years 2 months ago #81221

Andrea Malalana's Avatar Andrea Malalana Moderator

What Menu Item is 943? (the one that Better Preview generates a link for) Is it the homepage? Or what else?
And I assume 1505 is "Noticias"?

2 years 2 months ago #81222

Sukinoz's Avatar Sukinoz

a default home page with no language associated

drive.google.com/file/d/1EcM1nZhFrHrx9hW...cTk/view?usp=sharing

and yes, 1505 is associated with Noticias (spanish) category
drive.google.com/file/d/1Eeq_3n66LusRwWi...aEm/view?usp=sharing

2 years 2 months ago #81223

Andrea Malalana's Avatar Andrea Malalana Moderator

Ok, so we have to figure out why Better Preview is generating preview URLs with the Homepage Itemid (943) despite there being a Category Blog Itemid associated to those articles (1505).

We'll investigate this.

To have more info, do you also display articles of Noticias category in the Default Homepage 943 Itemid? Or not?

2 years 2 months ago #81225

Peter van Westen's Avatar Peter van Westen Admin

Better Preview will let Joomla (in your case sh404SEF) generate SEF urls for the non-SEF url of the item for the frontend.
It will do that based on the data it can find. That includes the menu item that matches the current item best.
If it cannot find a specific menu item for the current content item (or parent category), it will fall back on the menu item id of the home page.

Now here is the issue:
sh404SEF is generating duplicate SEF urls for urls using different Itemids (menu ids).

That is wrong, as the menu id can (as you have seen) result in completely different frontend results.

So this is an issue in sh404SEF, not Better Preview.

Maybe there is a setting in sh404SEF to not see different Itemids as duplicates. If not, you will have to ask the sh404SEF devs for more help on this.

2 years 2 months ago #81226

Andrea Malalana's Avatar Andrea Malalana Moderator

As an advanced user of sh404sef myself, I can rectify and say that it's not an issue of sh404SEF.

sh404SEF is generating duplicate SEF urls for urls using different Itemids (menu ids).
That is wrong, as the menu id can (as you have seen) result in completely different frontend results.

This is not wrong, infact, this is exactly what sh404SEF does and its whole purpose. sh404sef groups URLs going to the same content but from different Menu Itemids, into one "main URL", to avoid duplicate content. Also, sh404sef does not generate anything, they only store every URL that gets output by Joomla/or its extensions (in this case, Better Preview) and groups them if they are the same content but different Itemids.

sh404sef uses as "main URL" the FIRST url that gets generated. And then appends the subsequent ones as duplicates. You can then customize which one you want as a "main URL", but usually it's not needed as sh404sef will pick the first generated.

The issue is... since Better Preview is generating URLs before anything else (upon saving, before the frontend gets visited), the URL generated by Better Preview takes precedence over everything else. And, for this instance, Better Preview is generating the URL with the homepage Itemid, thus making this become the "Main URL" in sh404sef.

So Better Preview in this case is not finding the correct Itemid and is choosing the wrong Itemid for some reason. To put this into perspective, if he was to uninstall sh404sef, Better Preview would be still linking to a non-sef URL with the homepage Itemid, rather than the Noticias Itemid, which is the issue.

2 years 2 months ago #81227

Peter van Westen's Avatar Peter van Westen Admin

Can you give me (super) admin and (s)ftp access so I can take a look?
And tell me what article id and connected menu id this concerns?
You can use the 'Hidden text' button to hide the confidential information.

2 years 2 months ago #81229

Andrea Malalana's Avatar Andrea Malalana Moderator

Also, @Sukinoz, can you tell us whether the issue ONLY happens with articles contained in the Noticias category/menu or it happens for the others as well?
Can you narrow it down to what items the issue happens with? It can help pin-point exactly when and why this issue happens.
Thanks

2 years 2 months ago #81231

Sukinoz's Avatar Sukinoz

thanks for answering. This week i will make a copy of the site and give you access.

Also, @Sukinoz, can you tell us whether the issue ONLY happens with articles contained in the Noticias category/menu or it happens for the others as well?
Can you narrow it down to what items the issue happens with? It can help pin-point exactly when and why this issue happens.
Thanks

It happens with every article.

PD: As i have seen in the plugin options, Better Preview ask to insert a "Default Menu Item"... But In a multilanguage site we have several default menu items... (one for each language and other for "All")

2 years 2 months ago #81236

Peter van Westen's Avatar Peter van Westen Admin

Can you give me (super) admin and (s)ftp access so I can take a look?
And tell me what article id and connected menu id this concerns?
You can use the 'Hidden text' button to hide the confidential information.

2 years 2 months ago #81243

Sukinoz's Avatar Sukinoz

Sukinoz wrote:

thanks for answering. This week i will make a copy of the site and give you access.

Confidential information:
(hidden)



Just create a New article.
Select a category (es-ES), for example "noticias (es-ES)"
Clic "save"
Now, just press the "preview button" in backend, and you see the article OK, but the modules associated to "Noticias" in the right-sidebar are not showed, because the menu itemid is not ok...

note: for us this problem is NOT urgent/important, we can continue working without Better Preview.

2 years 1 month ago #81356

Sukinoz's Avatar Sukinoz

Hello, any news?

2 years 1 month ago #81359

Peter van Westen's Avatar Peter van Westen Admin

Sorry, I do not get notified when you edit existing posts. So I didn't see the newly added login details.

Can you also provide the (s)ftp login details?

2 years 1 month ago #81379

Sukinoz's Avatar Sukinoz

Confidential information:
(hidden)

2 years 1 month ago #81387

Peter van Westen's Avatar Peter van Westen Admin

I have switched off the "Default Menu Item" setting.
Can you see if that fixes the issue for you?

2 years 1 month ago #81395

Sukinoz's Avatar Sukinoz

Peter van Westen wrote:

I have switched off the "Default Menu Item" setting.
Can you see if that fixes the issue for you?

yes, SOLVED!

THANK YOU.

2 years 1 month ago #81428

Sukinoz's Avatar Sukinoz

Hello again,

I received a notification of "A new post has been made" in this forum, but here I cant see the message.

This is the content of the message that I received by email:

A new reply has been posted on the Regular Labs Support Forum (Better Preview)

www.regularlabs.com/forum/betterpreview/...404sef-problem/81409

Posted by: Andy Badwool
Better Preview vs SH404SEF problem!

Please try the latest development version:
www.regularlabs.com/development-releases

04-Aug-2018 : v6.1.2
# Fixes issue with Itemid always getting overridden in the url when a default is set in the Better Preview settings

The issue was that the "Default Menu Item" setting was always overriding the correct Itemid found, instead of only getting used when no other Itemid was assigned.
Now this issue has been fixed, so you can safely re-enable that setting.

2 years 1 month ago #81429

Andrea Malalana's Avatar Andrea Malalana Moderator

Yeah, I ended up deleting the message because apparently the newest development version that was released the other day didn't fully fix the issue yet. Planned to re-post it once the full fix was ready. Peter will release a new one soon.