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

#1253 – Title article in sh404sef 4.7

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, 31 October 2015 11:27 UTC
mrufip
Hi there,

I just upgraded to Sh404Sef 4.7. from version 4.6., but I found one issue for me, so I'd rolled back to 4.6.

The situation is as follows:
- I configured Sh404sef to add the 2 latest categories to the article title, for example:
Title-example of an article:
joomla article - category 1 - category 2 

in version 4.6. this worked perfectly, but in version 4.7. this doesn't work anymore. I saw in the changelog that this has changed and that on other component, which changes the title, has priority over sh404sef for the title shown.

On my wbesite, I have also JReviews, which only adds an review-form to the article and doesn't change the title/meta-description/meta-key of the article at all.
When I disable JReviews the article title from sh404sef is correctly added....
Somehow, Sh404sef detects that the article if modified by an other extension and doesn't apply the title no more. Also setting the prefered title in URL in sh404sef doesn't work....
Is there a way to override this? So that in all cases the title generation of the article is handeld by sh404sef?

If you need more information, or explanation, please let me know,

Kind regards,

Erwin
Monday, 02 November 2015 08:58 UTC
wb_weeblr
Hi

Somehow, Sh404sef detects that the article if modified by an other extension and doesn't apply the title no more. Also setting the prefered title in URL in sh404sef doesn't work....
This would indicate that JReviews does change the title, don't you think?

Also setting the prefered title in URL in sh404sef doesn't work....
Manually setting a title in sh404SEF has absolute priority.

Could you please provide us with superadmin credentials to your website. You can create a temporary account, and delete it afterwards, but it must have superuser level.

Thanks and regards
 
Monday, 02 November 2015 09:08 UTC
mrufip
Hi there,

Well yes agree, JReviews could change the title, but I think only rewrites it; the supplied title in the article stays exactly the same.

I'll supply you the login details in a moment, no problem.

Thank you and kind regards,

Erwin de Wolff
Monday, 02 November 2015 09:13 UTC
mrufip
Hi there,

The test website is:

http://xxxx.eu
login: xxxx
pass: xxxx

back-end:
http://xxxx.eu/administrator/xxxx
login: xxxx
pass: xxxx

Example:
http://xxxx.eu/frankrijk/bourgogne/motovacance-en-france.html
The title is "Motovacance en France", but the 2 latest categories should be added to it, so it should be "Motovacance en France | Bourgogne | Frankrijk"

Also, I added an modified title in Sh404Sef for this, but it doesn't show up.
When I disable the JReviews Content plugin, everything works as expected.

If you need more information, please let me know,
Kind Regards,

Erwin
Monday, 02 November 2015 10:28 UTC
wb_weeblr
Hi

JReviews could change the title, but I think only rewrites it;
Change or rewrite it the same. I think what JReviews is doing is setting the title, regardless of what happened before. So sh404SEF does set the page title, but then JReviews sets it back to the original, Joomla one.
Just an assumption though.

I see you have Akeeba. Can I take backup of the site, to install locally and debug the pHP in JReviews? That's the only way to know what it's really doing.

Rgds
 
Monday, 02 November 2015 10:38 UTC
mrufip
Hi there,

Yes, you can take a backup of the site, I assume that this data is handled confidentionaly. But you can also use this test environment to debug it, that's no problem.
The problem with installing it locally is, is that JReviews is domain locked... So I don't know if it will work for you.

Kind Regards,

Erwin
Monday, 02 November 2015 10:44 UTC
wb_weeblr
Hi

Yes, it's confidential and we don't keep backups anyway, there's just too many of them. We'll see about JReviews, I'm surprised it's domain-locked. Is it not GPL?

Rgds
 
Monday, 02 November 2015 11:01 UTC
mrufip
Okidoki, no problem.
JReviews is not GPL, the core is encoded with ioncube :(.

Kind Regards,

Erwin
Monday, 02 November 2015 11:23 UTC
wb_weeblr
Ha crap,

so I won't be able to access the source code then, and so I won't be able to help here I'm afraid.

Rgds
 
Monday, 02 November 2015 11:30 UTC
mrufip
Hi there,

Well yes and no, parts of the code are encoded, some are not.

The odd thing is, that using sh404sef version 4.6. everything worked as expected. Also with all the previous versions of sh404sef. But, since the update to 4.7 it stopped working....

Kind Regards,

Erwin
Monday, 02 November 2015 12:09 UTC
wb_weeblr
Hi

The odd thing is, that using sh404sef version 4.6. everything worked as expected.
It's not odd at all. That part was improved in 4.7.0 so that meta data and page title entered in Joomla articles and menu items had priority over the sh404SEF generated ones.
So the priority order is now:

sh404SEF auto-generated title (can be overwritten by) Title entered by user in Joomla article edit and Joomla menu items (can be overwritten by) sh404SEF manual title set in URL manager or Meta manager.

If JReviews is setting up itself a page title, then the sh404SEF will respect that and won't override it.

If that part of JReviews is encoded, i won't even be able to look at it and suggest a fix.

The strange thing to me is: why does JReviews do that? what do a review extension changes the page title. Do they add information to it, like the number of reviews? maybe there's an option to disable that?

Rgds
 
Monday, 02 November 2015 12:21 UTC
mrufip
Hi there,

Thanks for your reaction,

I don't know why JReviews does that, I can ask a support question for that.
But, wouldn't it be possible to make a kind of option in the configuration to switch back of the title behaviour in sh404sef in version 4.6.? Or can I make some custom modification to it? So I can upgrade to the new version?

Kind Regards,

Erwin
Monday, 02 November 2015 12:52 UTC
wb_weeblr
Hi

But, wouldn't it be possible to make a kind of option in the configuration to switch back of the title behaviour in sh404sef in version 4.6.?
No option for that, it's a total different workflow. In addition, it's the previous workflow that was not correct, or at least the most logical, so I'm not adding a parameter for that.

As for a hack, here is what I can suggest (untested):

- open /components/com_sh404sef/meta_ext/com_content
- on line 22, you'll see:
$joomlaTitle = Sh404sefHelperMetadata::getMenuItemTitle($Itemid);
$joomlaDescription = $document->getDescription();

- change that to:
//$joomlaTitle = Sh404sefHelperMetadata::getMenuItemTitle($Itemid);
//$joomlaDescription = $document->getDescription();


I believe this should be enough. Tell me if otherwise. But please remember this is a hack, meaning each sh404SFE upgrade will require to redo the changes.

Rgds
 
Monday, 02 November 2015 13:00 UTC
mrufip
Hi there,

Thanks for your fast reaction.

Too bad that an switch is not an option, but I can understand it from your point of view.

I tried your hack, but it didn't work... Do you have any other suggestions? An hack isn't prefferable, but when it works I can continue using sh404sef :-).

Also, I have asked JReviews about the title handling, maybe things will come into place.

Kind REgards,

Erwin
Monday, 02 November 2015 14:24 UTC
wb_weeblr
Hi

I unpacked the backup of your site and could look at the code. Jreviews does not seem to be fully encoded, probably only liek the license file or something.

Unfortunately, indeed it does change the title and doesn't provide any alternative to that:

if($menu
                && Sanitize::getString($menu->query,'option') == 'com_content'
                && Sanitize::getString($menu->query,'view') == 'article'
                && $params->get('page_title') != ''
                && $id == Sanitize::getInt($menu->query,'id')) {

                self::$pagetitle = $params->get('page_title');
            }
            else {

                self::$pagetitle = $article->title;
            }


What this does is either you enable the "Page_title" option in the plugins params or it resets the title to the actual article title. No way out.

So the only option (for me, JReviews devs may have better options) is to hack it:
- in /components\com_jreviews\jreviews\cms_compat\joomla\includes\plugins\jreviews.php
- at line 150, you'll see:
JFactory::getDocument()->title = $pagetitle;

- change the line to
//JFactory::getDocument()->title = $pagetitle;


Rgds
 
Monday, 02 November 2015 14:34 UTC
mrufip
Hi there,

Thank you for the work-around, many thanks! Works perfectly! :)

Thanks again for the great support,
Kind Regards,

Erwin
Monday, 02 November 2015 15:13 UTC
wb_weeblr
Hi

OK, in next version, there will be a (hidden) setting for that in sh404SEF, some kind of override. Want to test?

Rgds
 
Monday, 02 November 2015 16:59 UTC
mrufip
Hi,

Yes, certainly! Great! :)

Kind Regards,

Erwin
Monday, 02 November 2015 17:12 UTC
wb_weeblr
Hi

OK, it's a bit tricky, but that's not intended for users to use on a regular basis.

1 - Download the dev version from xxxx and install it
2 - Go to the /administrator/components/com_sh404sef folder. There, you should see a file called custom.sef.php
3 - At the end of the file you may see this line:
$shDefaultParams['SH404SEF_OTHER_DO_NOT_OVERRIDE_EXISTING_META_DATA'] = 1;


If it's there, change it to:
$shDefaultParams['SH404SEF_OTHER_DO_NOT_OVERRIDE_EXISTING_META_DATA'] = 0;

4 - If the line does not exist at the end of the file, add it yourself 'with = 0 at the end).
5 - If the file is not there, create it with the following content:
<?php
// custom.sef.php : custom.configuration file for sh404SEF
// @ant_version_ant@ - https://weeblr.com/joomla-seo-analytics-security/sh404sef

// DO NOT REMOVE THIS LINE :
if (!defined('_JEXEC')) die('Direct Access to this location is not allowed.');
// DO NOT REMOVE THIS LINE


$shDefaultParams['SH404SEF_OTHER_DO_NOT_OVERRIDE_EXISTING_META_DATA'] = 0;



That should make sh404SEF override again meta data set by Joomla and other extensions. This file is upgrade-proof: ie it won't be

Rgds
 
Monday, 02 November 2015 17:22 UTC
mrufip
Hi,

I just tested it, and it works like a charm :) Perfect! Also, the upgrade-proof is perfect, thanks!

When do you expect to have this in the official release?

Kind Regards,

Erwin
Monday, 02 November 2015 17:24 UTC
wb_weeblr
Hi

Next version is a maintenance release. As 4.7.0 had major changes, I'd expect to have a 4.7.1 within a couple of weeks, depending on the number of bugs found. So far, it's quite good, few bugs, so there's no rush to push this one out. Again, probably a couple of weeks.

You can run this version in production. Development is incremental, so what you have here is compatible with what you'll have in 2 weeks or so.

Rgds
 
Monday, 02 November 2015 17:26 UTC
mrufip
Okidoki, perfect! I'm gonna install this on the live website.

Kind Regards,

Erwin
Monday, 02 November 2015 17:38 UTC
wb_weeblr
Hi

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 unecessary risk in the future.

Rgds
 
Monday, 02 November 2015 17:56 UTC
mrufip
Okidoki, I have implemented it on the live website and works like a charm.

Would you be so kind to delete my post here with all the login data? Just in case that..

Kind Regards,

Erwin
Monday, 02 November 2015 18:03 UTC
wb_weeblr
Hi

We do that on a regular basis, no worries.

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.