Your Cart:
0 Items
Order Total: $0.00

0 Product
$0.00




Home
Welcome, Guest
Username Password: Remember me

SH404 Creating Wrong URL for Profile Latest Photos
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: SH404 Creating Wrong URL for Profile Latest Photos

SH404 Creating Wrong URL for Profile Latest Photos 1 year, 11 months ago #79

  • steve501
  • OFFLINE
  • Junior Boarder
  • Non-customer
  • Posts: 34
  • Karma: 1
Hi,

SH404 is generating incorrect urls for profile > latest photos.

Generating (incorrect)
www.domain.com/photos/album-name/photo.html#photoid=910

Should be (correct)
www.domain.com/username/photos/album-nam...oto.html#photoid=910

At the moment when clicking a photo it goes to a 'random' album.

Do you have a quick fix for this?

How long for the new plugin to be released?

Thanks // Steve

Re: SH404 Creating Wrong URL for Profile Latest Photos 1 year, 11 months ago #80

  • Bogdan
  • OFFLINE
  • Administrator
  • Posts: 657
  • Karma: 23
in 3 days we`ll release the update for sh404sef plugin and we`ll fix this problem..

Bogdan
Old enough to know better, too young to care.

Re: SH404 Creating Wrong URL for Profile Latest Photos 1 year, 8 months ago #173

  • steve501
  • OFFLINE
  • Junior Boarder
  • Non-customer
  • Posts: 34
  • Karma: 1
Unfortunately the latest patch did not solve this problem.

Latest photos are still going to a random album. This only happens when several users name the photo albums the same, eg, me, my pics etc.

It seems the "user id" really should be included in the url to distinguish. Anyone else having problems with this?

Tnks // Steve

Re: SH404 Creating Wrong URL for Profile Latest Photos 1 year, 8 months ago #174

  • Bogdan
  • OFFLINE
  • Administrator
  • Posts: 657
  • Karma: 23
Hi Steve,

You want the user id in all urls?..in photos urls it is included the username..so i don`t know why it is going to a random url..:|

steve501 wrote:


Bogdan
Old enough to know better, too young to care.
Last Edit: 1 year, 8 months ago by Bogdan.

Re: SH404 Creating Wrong URL for Profile Latest Photos 1 year, 8 months ago #175

  • steve501
  • OFFLINE
  • Junior Boarder
  • Non-customer
  • Posts: 34
  • Karma: 1
Hi Bogdan,

The photo albums are creating correct urls from what we can see.

Correct:
www.domain.com/user-a/photos/album-name/

www.domain.com/user-a/photos/album-name/photo.html#photoid=2593

However, when you click the same photo from the same user from their profile on the 'JomSocial Latest Photo's Plugin' it generates url:

Incorrect:
www.domain.com/photos/album-name-G/photo.html#photoid=2593

No username is present in url, and anyone who has album-name-G it will go to randomly.

JomSocial say this is SEF issue, but they way the url is building in latestphoto.php does not seem to look for username? What do you think?

plugins/community/latestphoto.php around line 144

function buildLink($albumid, $photoid){
$link = CRoute::_('index.php?option=com_community&view=photos&task=photo&albumid='.$albumid) . '#photoid='.$photoid;
return $link;
}

Tnks // Steve

Re: SH404 Creating Wrong URL for Profile Latest Photos 1 year, 8 months ago #176

  • Bogdan
  • OFFLINE
  • Administrator
  • Posts: 657
  • Karma: 23
Hi Steve,

Try to change that function with this

function buildLink($albumid, $photoid){
$link = CRoute::_('index.php?option=com_community&view=photos&task=photo&userid='.$userid.'&albumid='.$albumid) . '#photoid='.$photoid;
return $link;
}

Bogdan
Old enough to know better, too young to care.

Re: SH404 Creating Wrong URL for Profile Latest Photos 1 year, 8 months ago #177

  • steve501
  • OFFLINE
  • Junior Boarder
  • Non-customer
  • Posts: 34
  • Karma: 1
Thanks Bogdan, we tried this and thought the username would show but the url has not changed.

With your change url is:

www.domain.com/photos/album-name/photo.html#photoid=2621

We uploaded changed filed, purged sef links but no change.

Any other option?

Tnks

Re: SH404 Creating Wrong URL for Profile Latest Photos 1 year, 8 months ago #178

  • Bogdan
  • OFFLINE
  • Administrator
  • Posts: 657
  • Karma: 23
Look for this line:
$link = plgCommunityLatestPhoto::buildLink($data->albumid, $data->id);

and replace it with
$link = plgCommunityLatestPhoto::buildLink($data->albumid, $data->id, $userid);

then replace the buildLink function with this:
	function buildLink($albumid, $photoid, $userid){			
		$link	= CRoute::_('index.php?option=com_community&view=photos&task=photo&albumid=' . $albumid .  '&userid=' . $userid) . '#photoid='.$photoid;
		return $link;
	}
Old enough to know better, too young to care.

Re: SH404 Creating Wrong URL for Profile Latest Photos 1 year, 8 months ago #179

  • steve501
  • OFFLINE
  • Junior Boarder
  • Non-customer
  • Posts: 34
  • Karma: 1
Hi Bogdan,

I think you are getting closer ... username appears in the url but when clicking photo from latest photos it now says when you get to the page "Sorry the system needs a proper id to process."

Looks like it is a jomsocial issue and not SEF.

Will report it on the jomsocial website.

So close yet so far ... lol

Thanks for your help!!

Steve

Re: SH404 Creating Wrong URL for Profile Latest Photos 1 year, 8 months ago #180

  • Bogdan
  • OFFLINE
  • Administrator
  • Posts: 657
  • Karma: 23
Hi Steve,

I tested on a local installation and it worked..:|

Try replacing $userid with $this->_user->id..

Let me know if you solve this

Bogdan
Old enough to know better, too young to care.
  • Page:
  • 1
Time to create page: 0.99 seconds