Profile page SEF URLs

14 years 6 months ago #112517 by beat
Replied by beat on topic Re:Profile page SEF URLs
Rapunzl wrote:

Mine uses Joomla core SEF and has the form: www.mysite.com/userprofile/john with no extra tweaking.


Jamie is correct.

That's with a "CB Profile" menu with "userprofile" alternate title, and Joomla SEF on, no special .htaccess rules (except Joomla's).

I have nothing to add here.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

14 years 6 months ago #112531 by tisdale
Replied by tisdale on topic Re:Profile page SEF URLs
Okay, so now I understand from Beat that we have to leave the .htaccess aside, because this solution is not needed.
Beat also confirmed that by creating the right menu item for CB Profile with 'userprofile' as the title/alias then with Joomla SEF enabled this should result in this url:
www.mysite.com/userprofile/john
instead of this url:
www.mysite.com/component/comprofiler/userprofile/john
Not only when a logged in user clicks on a link that takes him to his own profile page, but that this is the url that any guest entering the site would see when he looks at other users profile pages.

So now the question is what is wrong with the way I have created the CB Menu item and why it doesn't
function as it should.

I should probably mention that It's not like I'm completely clueless here and should go research the menual again to know how to do it.

As I have described below, I have managed to create the three new menu items that lead to the desired URLs.

And one of them, the CB 'My Profile' menu item now has an alias of 'my-profile'.
Every time a logged in user on my site clicks on that menu item, he reaches his own profile page,
and with the correct url of:
www.mysite.com/my-profile
Apparently, that is because the original link (which I can not change) in the 'Community Builder User Profile' (the mandatory one)is this link: index.php?option=com_comprofiler
This link (with SEF or without), for me, links only to the specific logged in user own page.

I tried to change the name of this menu item to 'userprofile', and also tried to create a new one.
But how that would possibly cause the correct url to appear on profile pages of other users that I'm clicking on the links to their pages (in articles and comments), is a bit beyond me.
When I click to enter other profile pages they remain: www.mysite.com/component/comprofiler/userprofile/john

Any constructive ideas?
Jamie? You've managed to do it correctly :)

Please Log in to join the conversation.

14 years 5 months ago #112910 by tisdale
Replied by tisdale on topic Re:Profile page SEF URLs
Now it seems this has nothing to do with the menu item, but it can only be resolved through .htaccess
with a Joomla SEF rewrite rule.

I've just spent 5 days trying to figure out what I'm missing here.
It turned out I'm probably not missing anything, but just that, unfortunately, nobobody have read the small details of what I've written in this post, therefore the answer didn't correspond to the question.

As I said:
"I have articles with links leading to the CB profile pages of the authors, comments that lead to the CB profile pages of the authors".

Whenever a visitor would click on these links and reach profile pages, he would see:
www.mysite.com/component/comprofiler/userprofile/JohnDoe

So when would he see the desired short URL of:
www.mysite.com/userprofile/JohnDoe
He would see it if he either clicks on a link to his own profile page, through a menu item I have created
and named it 'My Profile', or, whenever a visitor would click on INTERNAL CB links to profile pages, such as CB who's online link to profile pages, or users lists. In that case I do get the correct URL that corresponds to the alias I have set, and the url would be: www.mysite,com/userprofile/JohnDoe

So back to the Rewrite Rule solution:

(this is for those who wish to use Joomla Core SEF, and not options like sh404SEF).

Kyle, I know I should build the RewriteRule properly but, as I said below, I don't have the experience to do so. That's why I was hoping you guys could help with this...

Now, this has to be stressed:
This is not a privet individual hack that needs to be done only for the sake of one person.
Having searched this forum for days now, I can safely say that this hack is much needed by a large portion of the CB users who currently don't have a solution.

It's really great that this issue has been covered in the past but, unfortunately, everything that was written is currently obsolete due to change in Joomla versions.

I referred you to a link to DjTrail RewriteRule:

RewriteRule ^([^/]+)/?$ /index.php?option=com_comprofiler&task=userProfile&user='$1' [L]

This good old rewrite rule has served thousands of CB users for years, and apparently now its time
is up.
I think it should have a tiny tweak to it to make it compatible with 1.5.14.

Please don't send me to go search Google to find the answer... because it would not work for someone
who doesn't have a vast knowledge how to create rewrite ruls.
Trust me, I have spent days trying to change the rule in my .htaccess, and the best I could do is to
display the correct short SEF URL in ALL pages, including none profile ones.

the change needed could have something to do with the fact that now the url needs to display username
at the end, and not user_id.

It could be something regarding the omission of the single quotes that was mentioned (altough I tried to
omit the single quotes from '$1' and it didn't help).

Could well be the order of the rules within the .htacess file, or could be any other factor.

Although everyone has the same default .htacess Joomla SEF rules in that file, and whatever
I see is what you see when using Joomla Core SEF with CB ), still, here is the part
of the Joomla SEF rules:

########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section

I think it would be highly helpful for everyone if someone from the CB team would test the implementation of the correct RewriteRule using Joomla core SEF on profile pages linked, for example, from comment systems (that link to CB profile pages), or from articles, or from any other non CB component, and see how to omit:
component/comprofiler for once and for all from the Joomla SEF URLs.

Then, posting the solution (that is actually relavent to the year 2009) on FAQ would hopefully help prevent so many people from going on and on about the same URL issue.

All we need is to see exactly how the WHOLE above Joomla core SEF section should look like now
with the correct RewriteRule placed within it.

I hope the CB team would be kind enough to help, and won't send me now to "search Google"...

Thank you very much,

(p.s. a nice donation would be gladly made for CB help)

Post edited by: tisdale, at: 2009/10/02 15:27

Please Log in to join the conversation.

14 years 5 months ago #112947 by Dieselmos
Replied by Dieselmos on topic Re:Profile page SEF URLs
I need this also my urls look like this now

www.mysite.se/profile/userprofile/username

But i got another problem when i click on a user from cb_superthumb i get this url:

www.mysite.se/component/comprofiler/userprofile/username

And no modules show up except those that will show on all pages. So if i have set up gallery module to only show up on profile page it will not show up on
www.mysite.se/component/comprofiler/userprofile/username
but will show up on
www.mysite.se/profile/userprofile/username

But if i browsing a profile already and click on a user in cb_superthumb the url will be right:
www.mysite.se/profile/userprofile/username

So its only when im not on a profile page that the link changes to
www.mysite.se/component/comprofiler/userprofile/username

I got the same problem with groupjive, if i click on a group from latest groups i get
www.mysite.se/component/groupjive/?action=gj.core.groups.showgroup&groupid=29

and when i browsing the group front page and click on latest groups i get
www.mysite.se/grupper?action=gj.core.groups.showgroup&groupid=29

without the /component/groupjive/

have i done something wrong ? and i was thinking of .htaccess to redirect /component/comprofiler/userprofile/userid or something to the right page but i dont think that will work :unsure:

Post edited by: Dieselmos, at: 2009/10/02 20:58

Post edited by: Dieselmos, at: 2009/10/02 23:36

Please Log in to join the conversation.

14 years 5 months ago #114749 by matu666
Replied by matu666 on topic Re:Profile page SEF URLs
i think everyone have this problem with joomla core sef but they just ignore it just like admins here. They just dont care.

Please Log in to join the conversation.

14 years 5 months ago #114759 by krileon
Replied by krileon on topic Re:Profile page SEF URLs
matu666 wrote:

i think everyone have this problem with joomla core sef but they just ignore it just like admins here. They just dont care.


We do care and we have stated how to accomplish this. SEO is not our problem. Download a SEF component and design the links whoever you see fit or make the correct rewrite in htaccess. CB is designed to accept and create SEO links through as long as you've designed your SEO properly.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.241 seconds

Facebook Twitter LinkedIn