By LAC Webadmin on Wednesday, 30 November 2016
Posted in Technical Issues
Likes 0
Views 248
Votes 0
Hi There,

Just a question, is there a reason why is it that the view has to be added to the SEF URL? For example, in Friends, Pages, Groups, etc. The URL will look like:

http://www.domain.com/friends/friends/all

The first friends is the menu alias, the second friends is the view.

In the folder /components/com_easysocial/sef_ext/friends.php:


if( isset( $view ) )
{
addView( $title , $view );
}


The view title is explicitly added, why?

Thanks,

Jackson
If without the view, Sh404sef unable to detect the correct view what you trying to access, you can check my attached screenshot below.

If your friend URL is http://www.domain.com/friends/friends/all , i assume you have create a menu item for Easysocial friend rmenu right?

If yes, you can replace following code if you would like to get rid out the 'friends' view name.

if (isset($view )) {

if ($view != 'friends') {
$title[] = JString::ucwords(JText::_('COM_EASYSOCIAL_ROUTER_' . strtoupper($view)));
}

shRemoveFromGETVarsList('view');
}


But if without Easysocial friend menu item, it will not append the view name on the URL, the URL will be http://www.domain.com/community/all (without friend view name)
·
Wednesday, 30 November 2016 12:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,

Thanks for the code.

Do you guys have plan of a more permanent solution to the URL SEF rather than this assuming that all Admins will not create a menu item for ES views so it defaults to what it is right now.

I don't want to have to overwrite files in sef_ext everytime I push an update to ES, you know what I mean.

Thanks,

Jackson
·
Thursday, 01 December 2016 01:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Currently I can't tell you whether that is possible to make it or not, but I will create a ticket in our codebase, we will see if we can implement this in the future version.
·
Thursday, 01 December 2016 11:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Arlex!

Hopefully the new routing system in J3.7 will solve a lot of issues with SEF URL and I could finally ditch SH404SEF

Or maybe you guys could find another SEF component that is easier to work with ES or any of your products. I would switch if you guys tell me to use this component instead of sh404

Jackson
·
Friday, 02 December 2016 01:47
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome.

Sure, if you find out any other good SEF component. you can share with us so we will see if this SEF component is it better than Sh404sef.

As a gentle reminder, kindly start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiry. I will lock and mark this thread as resolved.
·
Friday, 02 December 2016 10:41
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Jackson,

May i know is it possible to send us latest version of Sh404sef extension? Because we noticed 4.6 version is not support PHP7.

I think the latest version is 5.1.x . You can send to my mailbox arlex.wong@stackideas.com
·
Monday, 05 December 2016 19:11
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post