Registered user access to article problem

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Sat Jun 21, 2014 11:06 pm
Reply with quote
Report this post
Our intent is to have the News Show Pro GK5 module show an article intro and when a visitor clicks on a "Read More" link or article title link they get a message like "Please Register to View Articles". As a test, I set up one of the articles with the Access set to "Registered". In the NSP GK5 module the "Show unauthorized items" within the Data Source tab has been checked (or the article won't display at all). When the test article in the NSP GK5 module is clicked it just displays as if no "Registered" access is set. The entire article displays. What is wrong?
User avatar
Junior Boarder

GK User
Sat Jun 21, 2014 11:19 pm
Reply with quote
Report this post
Hello,

Are you sure that the article permissions are correctly set? Because the article content should be blocked on the Joomla! level - NSP generates only a link to the article.
User avatar
Administrator

GK User
Sat Jun 21, 2014 11:39 pm
Reply with quote
Report this post
I have the Access set to "Registered" for the article, that I am sure of. Is there something else that should be changed?
User avatar
Junior Boarder

GK User
Sat Jun 21, 2014 11:48 pm
Reply with quote
Report this post
Please check if you can view this article as an unregistered user while normally browsing a page (not using the NSP links) - if you can see it then it is a problem with your ACL configuration, not with NSP GK5.
User avatar
Administrator

GK User
Sun Jun 22, 2014 1:33 am
Reply with quote
Report this post
The site is set up with a hidden menu for each category (type: category blog) so that each article will display on its own page. Maybe this has something to do with the problem? However, with that menu item unpublished (and Access set to "Registered" for the article), the article still displays, it just shows at the bottom of all front page content. If I do a search for the article it does not come up in the search without first changing it back to "Public".
User avatar
Junior Boarder

GK User
Sun Jun 22, 2014 10:03 pm
Reply with quote
Report this post
Please try to open the article page as a logged in user, then please save the URL and log out - then please go to the saved URL.
User avatar
Administrator

GK User
Mon Jun 23, 2014 2:19 am
Reply with quote
Report this post
I logged in as a registered user, clicked the article, then compared the URL for that view and the one when not logged in. They are identical.
User avatar
Junior Boarder

GK User
Mon Jun 23, 2014 12:16 pm
Reply with quote
Report this post
Ok, but the article is displayed in both cases? The URL is the same as the URL from the NSP GK5 module for this article?
User avatar
Administrator

GK User
Mon Jun 23, 2014 12:59 pm
Reply with quote
Report this post
Yes the article displays either way. The URL are identical:
Code: Select all
www.sitename/menuitemname/articleID-articlename
User avatar
Junior Boarder

GK User
Mon Jun 23, 2014 1:26 pm
Reply with quote
Report this post
Correction on the URL breakdown:
Yes the article displays either way. The URL are identical:
Code: Select all
www.sitename/menuitemAlias/articleID-articlename

If I set the menu item for the category to Registered, the article displays at the bottom of the home page content and URL changes to:
Code: Select all
www.sitename/SubCategoryID-ParentCategoryAlias/SubCategoryAlias/articleID-articlename
User avatar
Junior Boarder

GK User
Mon Jun 23, 2014 1:34 pm
Reply with quote
Report this post
So the problem is strictly connected with the ACL issues not with the NSP GK5 module. In my opinion menu item access is not important - the most important is category and article access levels.
User avatar
Administrator

GK User
Mon Jun 23, 2014 1:40 pm
Reply with quote
Report this post
It was my understanding that changing the article Access to "Registered" would cause a user to have to log in or register. What ACL settings do you suggest are the problem? What should they be? This is a site which was just migrated from J1.5 and may have carried over some garbage, but it is otherwise set to default ACL as far as I know.
User avatar
Junior Boarder

GK User
Mon Jun 23, 2014 1:56 pm
Reply with quote
Report this post
Through more testing I've discovered that if Parent Category is set to "Registered" and the article is clicked, the article correctly does not display if the user is not logged in. However no login message shows. If you can help me figure out where my user login warning is the issue should be solved.
User avatar
Junior Boarder

GK User
Mon Jun 23, 2014 3:27 pm
Reply with quote
Report this post
So what is displayed when the non-logged user clicks the link to the article for registered users in your case?
User avatar
Administrator

GK User
Mon Jun 23, 2014 3:41 pm
Reply with quote
Report this post
The page just refreshes to the same (home) page and the URL displays:
Code: Select all
www.sitename/?id=ArticleID:ArticleAlias
User avatar
Junior Boarder

GK User
Mon Jun 23, 2014 3:54 pm
Reply with quote
Report this post
It must be something with your legacy after migration, because I've tested a similar case on our server and always I was returned to url like:

index.php/component/users/?view=login&return=RETURN_URL_BASE64_ENCODED

and I always get the login form.
User avatar
Administrator

GK User
Mon Jun 23, 2014 8:58 pm
Reply with quote
Report this post
As a test I set up a new Category, a new menu item (set to category blog for the test category) and 4 test articles as well as a new NSP module set to display the test category articles. It reacts the same way. When the article alone is set to "Registered" the article will still display. If I set the Category to "Registered" the page appears to refresh, the URL shows the sitename/?id=641:test-article-1 but will not give a login form or message. Once I log in, the article displays and the URL shows: sitename/testmenu/641-test-article-1
User avatar
Junior Boarder

GK User
Mon Jun 23, 2014 10:33 pm
Reply with quote
Report this post
As I wrote earlier - it can be a legacy of your migration or your internal configuration issues - in general solving this kind of problems is beyond of our technical support, because it is an issue with your custom configuration, not with our products.
User avatar
Administrator

GK User
Thu Jun 26, 2014 1:46 am
Reply with quote
Report this post
Any suggestions on where to start? What part of the ACL should I look at? What should it look like? I tested the same setup on an install of the News template demo (although it's on the GK4 module--when I tried updating to GK5 I could no longer save changes so I uninstalled it) and when the article was set to Registered it set a 404 error page, not a message about registering like I expected.
User avatar
Junior Boarder

GK User
Thu Jun 26, 2014 2:17 am
Reply with quote
Report this post
I finally found what is likely the problem: the Joomla "Show Unauthorised Links" in articles global settings has to be set to no. However, I still have a question:
When not registered it brings up the login page, but once logged in it does not continue on to the article. The first time it went to the user settings, now it just goes to a mostly blank page with the "Logout" and user menu. How can I get it to continue to the article?

For anyone needing the configuration solution:
System > Global Configuration > Articles > Articles (tab). Then scroll down to the Show Unauthorised Links near the bottom and toggle to No.
User avatar
Junior Boarder

GK User
Thu Jun 26, 2014 6:22 pm
Reply with quote
Report this post
Please check if you have set option "Login Redirect" for the menu item with the login page - it should be blank.
User avatar
Administrator

GK User
Fri Jun 27, 2014 2:18 pm
Reply with quote
Report this post
Is a menu item required? I did not have one set up in Joomla 1.5. Only a login module was set up and the same is true for this J3.x. The site does use the default News template “Login-top icon” as well as a Login module for the sidebar, but both have “Login Redirection Page” set to “Default”.

I added a Login Form menu item to see what happens. With that menu item hidden there was no change. It displays the “Your Details” -Edit Your Profile page, sometimes just a Log out page. With the Login menu item published it does the same.

Another annoying thing is, on attempted logout
Logout > Logout page with another Log out button > redirected to User login page with black bar at top “x Message, then on the next two lines in that black box, Please login first (x2)
User avatar
Junior Boarder

GK User
Fri Jun 27, 2014 5:38 pm
Reply with quote
Report this post
I have no idea what is a reason of your problem with the URLs - I've checked the original quickstart package and it always return to the article after loggin in.

Regarding the issue with messages - please add file html/message.php using the attachment and please also change in the css/joomla.css file the following fragment:

Code: Select all
#system-message dd.notice { background: #fff; }


to:

Code: Select all
#system-message dd.notice { background: #f1f1f1; }
User avatar
Administrator

GK User
Sat Jun 28, 2014 1:42 am
Reply with quote
Report this post
My joomla.css file did not have that line (#system-message dd.notice { background: #fff; }).

This is very frustrating. I've compared so many settings to the demo site install and it just doesn't work.
There has to be something that isn’t set up correctly. When I set up on the News demo site it won’t give a login screen:
Demo: sitename/index.php/component/user/?view=login
Staged: sitename/component/users/?view=login
Click on the link when not logged in, and the results:
Demo: 404 error
Staged: Template page with login fields
User avatar
Junior Boarder

GK User
Sat Jun 28, 2014 1:12 pm
Reply with quote
Report this post
To clarify:
There has to be something that isn’t set up correctly. When I set up on the News demo site it won’t give a login screen:
Demo: sitename/index.php/component/user/?view=login
Staged: sitename/component/users/?view=login
Click on the link when not logged in, and the results:
Demo: 404 error
Staged: Template page with login fields

The above is with the Article set to Registered.

On the Demo (which is a QuickStart install) when Category is set to Registered and Article to Public home page is shown with no article (URL: sitename/?id=18). "18" is the article ID
When both Category and Article are set to Registered a 404 error page is displayed.

Could this have anything to do with the fact that the News QuickStart uses K2? I do NOT have K2 on the staged site.
User avatar
Junior Boarder

GK User
Mon Jun 30, 2014 8:12 am
Reply with quote
Report this post
I missed a fact that I should check the com_content article not k2 - I've checked what will be if I set the article visible only for the registered users and I get the system message, but Joomla don't display the login form in this case - also on the Protostar template.

The same message I've achieved when I've set the article category only for registered users.

When I've set the article menu item only for the registered users then I've got the system message "Please login first" and the login form. After logging in I was redirected to the article.

So in the template all is ok - it behaves as I excepted and as the Protostar template behaves. You should ask on the official Joomla! support forum about this problem, because it is definitely connected with your Joomla! configuration, not with the template.
User avatar
Administrator

GK User
Mon Jun 30, 2014 1:26 pm
Reply with quote
Report this post
So, you are saying that with a Joomla article (not K2-I don't even have it installed), and the article's menu item set to Registered, you get the "Please login first" and the login form and then the article?

I can't even get that. My test articles and NSP GK5 module were set up just like the rest of the site with a hidden menu item (category blog) for the article's category (although the real articles are in a sub-category). All I get is the login, then on success the logout. I even tried changing the menu item type for the test article to Single Article and got the same results. So, no matter what I do I cannot get the proper behavior.
User avatar
Junior Boarder

GK User
Tue Jul 01, 2014 7:39 am
Reply with quote
Report this post
So please consult this problem on the official Joomla! support forum - it must be something with your configuration.
User avatar
Administrator


cron