• Home
  • Get help
  • Ask a question
Last post 17 min ago
Posts last week 94
Average response time last week 34 min
All time posts 67848
All time tickets 10485
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.

#29 – sh404SEF Issue with EasySocial

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, 09 April 2015 01:05 UTC
altitudes
Hello

I'm using sh404SEF with EasySocial (latest version) and I tried several configurations (in General > By component > easysocial).

This is what I get as a SEF URL for an album in an event with the different configurations:

1- "Use Joomla! router" > "Use sh404sef plugin if available"
http://.../index.php/communaute/albums/event/37-oui
I get the same if I disable sh404SEF and use core Joomla SEF.

2- "(use default handler)" > "use Joomla! router.php"
http://.../index.php/albums/event/37-oui

3- "(use default handler)" > "Use sh404sef plugin if available"
http://.../index.php/communaute/albums/event/0

"communaute" is the alias of my EasySocial menu item. "oui" is the title of my event.

I need to customize some of my SEF URLs, therefore option 2- or 3- is needed for me.
Option 3- obviously have a bug on this particular page (album in an event).
Option 2- works on this page, but I can't get why I don't have the menu alias in the URL. On a couple of other EasySocial pages, menu alias is back in the URL and I get a 404 error on these pages.

Thanks for your help, don't hesitate to ask for more details.
Thursday, 09 April 2015 11:08 UTC
wb_weeblr
Hi

I don't use EasySocial but I do know about EasyBlog and EasyDiscuss that we have here at weeblr.com.

Both comes with an sh404SEF plugin. You can check that by going to `/administrator/components/com_easysocial/`. You should have an /sef_ext folder there, and inside an `com_easysocial.php`. That's the sh404SEF plugin.

As for the setting, you should definitely in that case use #3. The bug, if any, is in that particular file and should not be hard to fix.
Most efficient is to contact StackIdeas about this, but if you attach the plugin to this ticket (rename it first com_easysocial.php.txt, as php files are not allowed), I can have a look.

To do that, I'll also need the exact full non-sef url that correspond to index.php/albums/event/37-oui.

Rgds
 
Thursday, 09 April 2015 12:05 UTC
altitudes
Thanks for your answer.

I don't have any sef_ext folder in administrator/components/com_easysocial/
I have one in components/com_easysocial/ with a lot of files in it, among whose a com_easysocial.php file (see attached files).

Here are the URLs...
- With configuration 3- (info from sh404SEF in backend)
SEF url: communaute/albums/event/0
Non-SEF url: index.php?option=com_easysocial&Itemid=463&lang=fr&type=event&uid=8&view=albums
- With sh404SEF disabled and Joomla SEO on
SEF url: communaute/albums/event/8-bowling-201412 (yes my event name changed ;)

Regards
Thursday, 09 April 2015 12:08 UTC
altitudes
Well...

Got message:
Error while uploading file com_easysocial.php.txt: Attachment upload error: This file type is not supported.

Had a look into the file and it is quite short anyway, I think you will need the complete content sef_ext folder. How can I send it to you?
Thursday, 09 April 2015 12:12 UTC
wb_weeblr
Sorry, my bad, yes it's on the frontend.

Yes, surely I'll need all the files, I assume they have broken it down in many parts.

Simplest is to zip it and email it to [email protected].
When you do that, make sure you mention in the subject line:

"Attention: support, ticket #29"

Rgds
 
Thursday, 09 April 2015 15:02 UTC
wb_weeblr
ok, had a look, don't see anything strange pers. The problem comes from the fact this sh404SEF plugins expects the URL to have a ...&id=xxxx... to get the album title.

But in your case, the id is passed in the variable ..&uid=xxxx.. (xxxx being the id of the album).

So I don't know where the problem is really: is the variable name wrong? or the non-sef url wrong?

The most likely reason I would imagine that they made a change to their non-sef URLs, and forgot to update the sh404SEF plugin.

Can you send me the router.php file for Easyblog? by coparing both, I can surely figure out what the problem is

Rgds
 
Thursday, 09 April 2015 15:13 UTC
altitudes
You mean router.php file for EasySocial I suppose ;) Check your mails...
Friday, 10 April 2015 09:41 UTC
wb_weeblr
Wow, never seen anything so complicated for routing. I had to install the component, I couldn't find the router just unzipping files, there are dozens of them.

Anyway, yes, it looks like their router is using the "id" variable, not "uid", so that should be the root of the problem. Can you give a try at modifying /components/com_easysocial/sef_ext/albums.php, between lines 47 and 57, replace all "$uid" with "$id". Should become:
// For photos, we need to get the beautiful title
if( isset( $uid) )
{
	$album 	= FD::table( 'Album' );
	$album->load( (int) $uid );

	$albumTitle = $album->core ? JText::_($album->title) : $album->title;
	$title[]	= JFilterOutput::stringURLSafe($albumTitle);

	shRemoveFromGETVarsList( 'uid' );
	shRemoveFromGETVarsList( 'layout' );
}


(need to purge urls, or at least delete the urls involved, so that they are recreated after the changes)
It will probably work, but I can't test, and most importantly it might have side effects, so you still have to take it to Stackideas and ask for an sh404SEF plugin update.

Rgds
 
Friday, 10 April 2015 10:13 UTC
altitudes
Did not work :(

Faulty communaute/albums/event/0 URL was changed to:

communaute/albums/event/0/photos-de-couverture

"Photos de couverture" is one of the event albums. This link is supposed to be to the the list of albums for the event.
Friday, 10 April 2015 10:46 UTC
wb_weeblr
hmm, ok. Their router does indeed talk about "new URL structure" in the albums handling
// New url structure uses uid=x&type=y
$uid 		= isset( $query[ 'uid' ] ) ? $query[ 'uid' ] : null;
$type 		= isset( $query[ 'type' ] ) ? $query[ 'type' ] : null;


I won't be able to figure it out without stepping through the code. At this stage, it really is an issue in EasySocial code, so it'd be way faster to take it to them.
Otherwise, you'll have to take a full backup of the site (akeeba backup is the right tool for that), and I'll install it locally to be able to debug.

Rgds
 
Friday, 10 April 2015 11:24 UTC
altitudes
OK, I'll ask them and let you know.

Can you just clarify one thing for me: code that is used to generate SEF URLs for sh404SEF is different from the code used by Joomla core SEO? This explains why this is OK with Joomla core SEO and not with sh404SEF?
Friday, 10 April 2015 12:06 UTC
wb_weeblr
Yes, that's the point. If we use the same code, then we would produce the same URLs.
There are some settings in sh404SEF to force it to use Joomla code (under the By Components tab of General configuration), but if you do that, you're outside of the chartered territory and I would totally not recommend it.
Stackideas has taken the pain to write an SH404SEF plugin, and it may need a bit of update, but that's by far the way to go.

Rgds
 
Saturday, 11 April 2015 17:22 UTC
altitudes
Hello

I got the correction from StackIdeas Support, in the attached file you can compare to the old one.

Thank you for the time you spent on it, if I knew the problem was on EasySocial side I certainly would have asked them first ;)
Saturday, 11 April 2015 17:26 UTC
altitudes
Off course PHP file attachment failed ;)

Please see attached image.
Monday, 13 April 2015 09:46 UTC
wb_weeblr
Ah crap, that was simple!

yes, PHP attachments are disabled, though you should be able to upload it you rename them as .txt

Closing this ticket now, feel free to open a new one as needed.


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.