Skip to Content Skip to Menu

Estrange bug on joomla 3.9

  • sorozco
  • sorozco
  • OFFLINE
  • Posts: 92
  • Thanks: 5
  • Karma: 1
5 years 4 weeks ago #314924 by sorozco
Estrange bug on joomla 3.9 was created by sorozco
I have a problem and i try to explain

I upgrade the site from Jommla 2.5 , CB 1.9 and cbsubs 3.0 i have a few plans and everything works fine on J2.5 but have a extrange bug on J3.9 that i try to explain.

The plan is configure to restrict Item menu, category and content.

One of the category restricted to plan A is itemid 82
When i enter with an user that have permission to see the category 82 (Of course menu and content are fine) i get the accessdenied with the follow url
Code:
index.php?option=com_comprofiler&view=pluginclass&plugin=cbpaidsubscriptions&do=accessdenied&accesstype=contentdisplay&accessvalue=82&accessurl=aW5kZXgucGhwP29wdGlvbj1jb21fY29udGVudCZ2aWV3PWFydGljbGUmaWQ9ODQ6Y21taQ==&Itemid=201
Like you can see the accessdenied is for the content with id 82 witch is from another plan in another category.
The problem here is that the content 82 is not part of the plan is for another one The solution is add the content 82 to the plan and every works fine but is not part of the plan.
Why i get content restricted if is not part of the content, menu or category?
Why the same thing is not happen on Joomla 2.5?
I hope i explain everything
What i can do to solve this?
Many thanks.

Please Log in or Create an account to join the conversation.

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
5 years 4 weeks ago #314930 by beat
Replied by beat on topic Estrange bug on joomla 3.9
Bugs got fixed since then, and it seems to me that this is working as intended.

- if Plan A allows access to a menu itemid (e.g. MyMenu), and
- if Plan B allows access to an article (content id) (e.g. MyArticle)

then to access that MyArticle WITH that MyMenu, your user needs to have both plans active.

Or did I miss something ?

One important remark regarding your citation:

> One of the category restricted to plan A is itemid 82

Category and itemid (Menu id) are two different things in Joomla. You can have multiple Menus (itemids) displaying the same content or category. The above access controls (and those Access Levels in ACL of Joomla as well) allow you to allow access through one menu but not through another menu.

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 or Create an account to join the conversation.

  • sorozco
  • sorozco
  • OFFLINE
  • Posts: 92
  • Thanks: 5
  • Karma: 1
5 years 4 weeks ago #314931 by sorozco
Replied by sorozco on topic Estrange bug on joomla 3.9
Hi, i try to explain better.

Item id 552 to access category id 82 (all fine) if i allow those 2 things in a plan cbsubs denied access because i don´t have permission to article id 82 witch is in another category and another item menu and another plan.

Do you want i make a video? Is hard to me explain in english

Please Log in or Create an account to join the conversation.

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
5 years 4 weeks ago - 5 years 4 weeks ago #314934 by beat
Replied by beat on topic Estrange bug on joomla 3.9

sorozco wrote: Hi, i try to explain better.

Item id 552 to access category id 82 (all fine) if i allow those 2 things in a plan cbsubs denied access because i don´t have permission to article id 82 witch is in another category and another item menu and another plan.

Do you want i make a video? Is hard to me explain in english


As I understand your explanation, you have:

- Plan A gives access to Menu Itemid 552 and category id 82
- Plan B gives access to article id 82 (which is part of category id 82)

- User with only Plan A but no Plan B cannot access article id 82 using menu itemid 552 ?

If that is the case, it works as intended (and if it worked in a previous version of CBSubs it was a bug that got fixed):

To access an article, you must not be forbidden by article id, by category id and by menu id.

EDIT:
Your solution is to add the article id 82 also to Plan A, if you want users with only Plan A but no Plan B to access article id 82 using menu itemid 552, while having people with plan A able to access other articles of category id 82.

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
Last edit: 5 years 4 weeks ago by beat.

Please Log in or Create an account to join the conversation.

  • sorozco
  • sorozco
  • OFFLINE
  • Posts: 92
  • Thanks: 5
  • Karma: 1
5 years 4 weeks ago #314936 by sorozco
Replied by sorozco on topic Estrange bug on joomla 3.9
Article id 82 is part of category 85 not category 82

I try access to category 82 but don´t let me in because article 82 is part of another Plan another category and another menu id.

That is the problem. I think in anywhere the cbsubs tink that the category 82 and the article 82 are the same and because the plan don´t have access to article 82 denied access.

in Joomla 2.5 works perfect same configuration the problem is in Joomla 3.9

Please Log in or Create an account to join the conversation.

  • sorozco
  • sorozco
  • OFFLINE
  • Posts: 92
  • Thanks: 5
  • Karma: 1
5 years 4 weeks ago - 5 years 4 weeks ago #314972 by sorozco
Replied by sorozco on topic Estrange bug on joomla 3.9
As I tried to explain, everything is working as intended in cbsubs 3.0, but when I upgraded to 3.9 it stopped working.

Now, the user that used to have access to their plans in 3.0, cannot access them anymore with cbsubs 3.9.

Searching for the error I found that, if the user had access to a plan A that gave them access to category 82 (i.e. CatZ), even when the plan has been configurated to have access to CatZ, they cannot access to that course/plan A anymore.

What I discovered is that I could solve the problem, if I add to that plan permission to access the article 82 (same number as the category). When I add that menu item they can access the category 82, and therefore the course of that plan A (as they used to do when it was cbsubs 3.0).

The problem is that the article item 82 is not part of plan A / category CatZ. But if I don't add the permission to that element, they cannot access any part of the course. Because the system "concludes" that the plan doesn't have permission for category CatZ (category 82).

I have 10 courses / pans, and all of them have that same problem. I have to check the category number associated to that plan, and add the article with that same id (as the category) to make it work, so the user can access their associated plan (and the category associated with the plan).

Example:

Plan A : catA (category Id 82). I have to add permission to article 82 to make it work
Plan B : catN (category Id 97). I have to add permission to article 97 to make it work
Plan C : catF (category 123). I have to add permission to article 123 to make it work

As I mentioned, the article that I had to add to the plans don't correspond to the elements that should be in that course / plan.

So, it seems like the system is confused between categories ids and articles ids. Instead of checking if there is permission to the category 82, checks if there is permission to the article 82.

Hope it was more clear.

I didn't change anything in the plan when I upgraded. But, I verified that all the configurations of the plans were kept as the original in 3.0, and they are.
Last edit: 5 years 4 weeks ago by sorozco.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum