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

Title links of articles are not clickable for public in blog view if the content is restricted to registered #8790

Closed
hakanara opened this issue Dec 26, 2015 · 14 comments

Comments

@hakanara
Copy link

I followed all the steps of "Editing Restricting access to Articles individually" as stated here:
https://docs.joomla.org/Restricting_access_to_%22read_more%22

As a result, in the blog view, the article titles are not clickable although the opposite is selected in the menu settings. (Administrator -> Menu of the blogged category -> Options -> Linked titles -> Yes)

But when I login, the titles are clickable. I copy the link when I am logged in, I log out and paste the link to the browser, I access to the page where the first half of the text before "read me" is displayed. So actually the link works. So why can not I make it clickable from the menu settings?

Logically, if the link shows the first part of the restricted content (the part before read more) when pasted it into the browser, it should be clickable in the blog view. As far as I remember, it was clickable before.

(On top, I think because of these settings, when I use a sitemap component (like OSmap) the links are not shown on the sitemap.)

For the search engines to follow the first part of the content, I propose the links to be clickable on the blog layout if the opposite is not set in the menu settings.

@sovainfo
Copy link
Contributor

Recall that to be a known bug, no solution provided.
Suggest to use globally instead of the menu item (individually).


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

@hakanara
Copy link
Author

Thank you, can you elaborate your suggestion please? What does "use globally" mean? You mean set each article individually?

@sovainfo
Copy link
Contributor

No, the document you referred to mentions 1. individually and 2. global.
You mentioned you opted for 1 indivually.
2. global is at the component level.

@hakanara
Copy link
Author

There is no change. The title links are still unclickable. I tried many different combinations. Does it work for you if you do it as the 2nd option?

@sovainfo
Copy link
Contributor

Don't know, not using that functionality.

@liluxdev
Copy link

Making this change should solve your issue: staging...creativeprogramming:patch-3

I commented the '&& $params->get('access-view')' in layouts/joomla/content/blog_style_default_item_title.php

@hakanara
Copy link
Author

Yes it worked @CreativeProgramming Grazie mille. So are you going to add the new parameters now? Joomla team rocks :-)

@liluxdev
Copy link

@hakanara no, I'm a Joomla user like you, not part of the Joomla team, I provided just a way for you to fix and some 'suggestion/inspiration' for the team to locate where the issue is, and the 'TODO:' i wrote in the code comments is part of my suggestion: let's hope someone in the team will take this and improve it (I didn't made a PR as I know that my time is not enough to test and use the proper code styling, I just want to help to fix issues, not to merge my code).

Note: there are also other views to fix with the same issue (that can be fixed in the same way) and I think adding a parameter is a good thing, anyway they may also simply remove the '$params->get('access-view')' check as it's unneeded for security as in the item view, like you stated, is instead used just to hide the 'fulltext' but not to prevent access to the URL, so having links to it should not be prevented

@hakanara
Copy link
Author

Actually there is already a parameter for this (Show title with links or something like this) So if the article is blocked by access restrictions, maybe there would be no need for hiding the link of the article. Let the developers discuss it.

@hakanara
Copy link
Author

hakanara commented Jan 3, 2016

@CreativeProgramming You gave me an idea. I copied the modifed file to the html folder of the template and it works. Thank you. Hopefully, Joomla developers will respond to this :-)

@sovainfo
Copy link
Contributor

sovainfo commented Jan 3, 2016

Unfortunately that is not the way it works here. Without a PR with the suggested code change nothing is going to happen. You might be lucky and find someone that produces the PR. Doubt that very much because both solutions provided by @CreativeProgramming are not of the quality to be applied to core.

Advice against using the modified code even as an template override. It is clear that you don't understand the meaning of the setting access-view. Removing that condition indeed gets you the linked title, only for more situations than you want. Obviously you need to restrict it to the situation at hand. Which is when you configured to show the teaser.

So, the condition would be:
if ($params->get('link_titles') && ($params->get('access-view') || $params->get('show_noauth', '0') == '1'))

@hakanara
Copy link
Author

hakanara commented Jan 3, 2016

@sovainfo , thank you very much. Your recommendation also worked for me. I managed to solve the situation with the template override. I know that the developers should agree on a solution and the code should be added to the package with a PR. I don't want to create many discussions, but your recommendation in the last message could be implemented to the core, right?

sovainfo added a commit to sovainfo/joomla-cms that referenced this issue Jan 3, 2016
Fixing joomla#8790

When using the teaser there should be a link if so configured.
@sovainfo
Copy link
Contributor

sovainfo commented Jan 3, 2016

Created #8827
Please mention your test result using issues.joomla.org on #8827

With thanks to @CreativeProgramming for pointing to the troubled code.

Suggest to close this issue, as there is a PR.

@hakanara
Copy link
Author

hakanara commented Jan 3, 2016

@sovainfo Thank you very much. Great team here.

I have tested all the combinations (authorized links = yes/no, clickable title links = yes/no, and acess rights = registered) and it worked as expected. So I close the issue now.

@hakanara hakanara closed this as completed Jan 3, 2016
rdeutz pushed a commit that referenced this issue May 3, 2016
Fixing #8790

When using the teaser there should be a link if so configured.
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

4 participants