Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search Engine Friendly URLs is not friendly to TOS article #5955

Closed
abokuo opened this issue Feb 3, 2015 · 7 comments
Closed

Search Engine Friendly URLs is not friendly to TOS article #5955

abokuo opened this issue Feb 3, 2015 · 7 comments

Comments

@abokuo
Copy link

abokuo commented Feb 3, 2015

Steps to reproduce the issue

  1. Enable "User - Profile" plugin and assign an article with TOS.
  2. Set "Search Engine Friendly URLs" to "Yes" at global configuration.

Expected result

When user wants create a account and click "Terms of Service:" link, it will show
a modal box with TOS article.

Actual result

When user wants create a account and click "Terms of Service:" link, it will show
a modal box with index page (eg. feature articles) not the TOS article.
When "Search Engine Friendly URLs" switch to "No", the modal box shows TOS article as normal.

System information (as much as possible)

From the system information:
PHP Built On: Linux 3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014 x86_64
Database Version: 5.5.41-0ubuntu0.14.04.1
Database Collation: utf8_general_ci
PHP Version: 5.5.9-1ubuntu4.5
Web Server: Apache/2.4.7 (Ubuntu)
WebServer to PHP Interface: apache2handler
Joomla! Version: Joomla! 3.4.0-beta1 Beta [ Ember ] 27-January-2015 20:00 GMT
Joomla! Platform Version: Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.2.5 (KHTML, like Gecko) Version/8.0.2 Safari/600.2.5

Additional comments

the issue was also on Joomla! 3.3.6.

@brianteeman
Copy link
Contributor

I can not replicate this. Please test with one of the default Joomla templates to eliminate a template issue


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5955.

@abokuo
Copy link
Author

abokuo commented Feb 3, 2015

Thank you for replying, I encounter this issue when the default template is protostar or beez3, thanks.

@joomdonation
Copy link
Contributor

I can confirm the issue. In my setup:

  1. The terms and conditions article belong to "Uncategorised " category
  2. There is no menu items to link to com_content (except the home menu item which is linked to featured article view)
  3. The link has the format http://localhost/joomla/?id=1&tmpl=component (I think it is wrong)

It seems something with SEF, I also had this problem with my custom extension which uses Joomla article as terms and condition. Usually, when my customers received this error, I guide them create "hidden menu item" to link t the terms and condition article and it will work well.

I tried abit and found that adding category id of the article to function getArticleRoute in this line of code https://github.com/joomla/joomla-cms/blob/staging/plugins/user/profile/fields/tos.php#L92 seems fix the issue. But I don't think that's the proper way to fix it

Needs someone who understand SEF well to look at it if we really want to solve this issue.

@zero-24
Copy link
Contributor

zero-24 commented Feb 3, 2015

@Hackwar can you have a look into this?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5955.

@Hackwar
Copy link
Member

Hackwar commented Feb 3, 2015

/plugins/user/profile/profile.php line 92. This needs to be called with the category ID of the article. Since there is no catid present, that needs to be retrieved from #__content first. At that time I would also advise to load the article slug to get a correct URL.

@joomdonation
Copy link
Contributor

OK. Thanks Hannes for instructions. I made a small PR to fix this issue. Please help testing it to get the issue fixed.

@brianteeman
Copy link
Contributor

See #5968


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5955.

roland-d added a commit that referenced this issue Sep 8, 2015
Fix #5955: Search Engine Friendly URLs is not friendly to TOS article
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants