Webmastersite.net
Register Log In

User name + SEO = broken profile url

Comments on User name + SEO = broken profile url

sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Apr 07, 2009 - 12:54 PM:

I just had a user sign up and their SEO member profile url isn't functioning.

username: sandy
memberprofile becomes: sandy.html

all other usernames functioning.

IE This one below is functioning.

username: george
member profile becomes: george.html


At first I thought it was because they used caps, but that isn't it. I have another member also using caps and their member profile comes up immediately.

Regenerated members, still no luck.

What have they done? Sometimes punctuation will mess it up but I don't see any. I've had to put that in the registration form to tell users not to use punctuation.

Could it be something from the recent upgrade?

sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Apr 09, 2009 - 11:46 AM:

Found the problem but I have no solution.

Users cannot use the word AND in their username.


How to combat that other than "please don't use the word :and" in your name"?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Apr 10, 2009 - 2:12 AM:

What's your profiles rewriting scheme? It sounds like you don't have the id in it, which is required. The default is members/{MEMBERNAME}-{MEMBERID}.html

I have tons of members with "and" in their name, like www.webmastersite.net/forum...mbers/blandonnet-1121.html -- that's not the problem. The problem appears to be that you removed the -{MEMBERID} bit from your profile rewrite scheme.
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Apr 10, 2009 - 8:03 AM:

members/{MEMBERNAME}.html is what I have but I don't remember changing it. Is this the default or did I erase something?

I'll add the id now.
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Apr 10, 2009 - 8:08 AM:

When I add the -{MEMBERID} to the SEO url it breaks my custom image attachment on the member profile template. ODD

This is the code for the custom image attachment I have to show different items to different groups on the profile template.




<IF {THISMEMBERISGUEST} or {THISMEMBERUSERGROUP} is 2><h2 align="center">{MEMBERNAME}</h2><ELSE><IF {MEMBERWRITERPHOTOATTACHTITLE}><img src="{MEMBERWRITERPHOTOATTACHDOWNLOADURL}" style="margin:auto;"/><h2 align="center">{MEMBERNAME}</h2><br><ELSE><img src="images/profile_notfound.jpg" style="margin:auto;"><br><h2 align="center">{MEMBERNAME}</h2><br></IF></IF>


I'm removing the "-{MEMBERID}" from the SEO url for profiles until this post is read by you.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Apr 10, 2009 - 5:12 PM:

members/{MEMBERNAME}-{MEMBERID}.html has always been in the shipped value and anything without {MEMBERID} has never worked properly.

The URL of the page can't possibly affect that code, since the page isn't even aware of the rewritten URL -- it only knows the .php version that the .htaccess sends it. There has to be some other difference between the two scenarios. If you show me the examples I can probably spot it.
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Apr 10, 2009 - 7:18 PM:

Well the code above is my example.

I literally changed the SEO url from

members/{MEMBERNAME}.html

to

members/{ME MBERNAME}-{MEMBERID}.html

and this code stops working:

<IF {THISMEMBERISGUEST} or {THISMEMBERUSERGROUP} is 2><h2 align="center">{MEMBERNAME}</h2><ELSE><IF {MEMBERWRITERPHOTOATTACHTITLE}><img src="{MEMBERWRITERPHOTOATTACHDOWNLOADURL}"  style="margin:auto;"/><h2 align="center">{MEMBERNAME}</h2><br><ELSE><img src="images/profile_notfound.jpg"  style="margin:auto;"><br><h2 align="center">{MEMBERNAME}</h2><br></IF></IF> 


If the user hasn't uploaded a photo and you are logged in you see a holder image of a head with a question mark.
the other user does not. Neither image comes up when
members/{MEMBERNAME}-{MEMBERID}.html is the SEO url for profiles.
you'll have to set the SEO url temporarily to test it. I took off -{MEMBERID}

I am now remembering this broken image issue from before but never reported it, that's why I removed the -{MEMBERID} from the url in the first place.

login as me (if you still have the password) to see.



FYI guests do not have access to member profiles.
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Apr 11, 2009 - 11:05 AM:

Testing some stuff today. Using a user as example. user has no photo uploaded to field WRITERPHOTOATTACH

When SEO is set to : members/{MEMBERNAME}-{MEMBERID}.html

Code looks like this in the browser:

 <img src="http://myurl.com/{MEMBERWRITERPHOTOATTACHDOWNLOADURL}" />


When SEO is set to : members/{MEMBERNAME}.html

Code looks like (expected behavior) this in the browser:

 <img src="http://myurl.com/images/profile_notfound.jpg">


This is odd behavior because with the correct SEO url members/{MEMBERNAME}-{MEMBERID}.html, the conditionals are read as if it's trying to read an attachment which of course doesn't exist because this user has nothing uploaded. But with SEO set to members/{MEMBERNAME}.html it correctly reads the conditionals and serves up the profile not found image.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Apr 12, 2009 - 12:03 AM:

Hm. Looks like whenever a member is loaded as a row, custom attachment fields are processed -- when they're loaded as a specific id, custom attachment fields aren't processed (non-processing means the template variables are literal unreplaced text, instead of blank, so they always evaluate to true in a conditional). It just so happens that the no-id rewrite scheme loads it as a row.

Same holds for custom rating fields.

This makes sense now, as members have special id processing.

Fixing in a really ugly duplication way for now in 5.0. Cleaning up to have it not be a special case (riskier) in 5.1.

This issue also applies to categories, as well as members.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.