Closed (fixed)
Project:
Permissions by Term
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Aug 2017 at 10:36 UTC
Updated:
12 Sep 2017 at 13:45 UTC
Jump to comment: Most recent
Comments
Comment #2
nielsvoo commentedsubscribe!
Comment #3
jepster_Could you please provide a bit more details? I have installed a fresh Drupal and afterwards the Permissions by Term stable version (which is the stame what the dev version is) and I can install it without issues. Does this error appear on a specific page?
Comment #4
prathibhab.cdac commentedI installed drupal. Then installed the branch 8.x-1.24 version of permissions_by_term module.
Enabled the permission by term module. Drupal works fine. There are no issues.
Now I uninstalled permissions by term module.
Applied the patch http://cgit.drupalcode.org/permissions_by_term/commit/?id=fd239d9c58ecb4....
Now in the drupal website, I enabled permissions by term module. Under the taxonomy term asssigned the permission for an user. I tried to login as that user. The site shows "website encountered an error."
The apache error shows:
Uncaught PHP Exception Drupal\\Core\\Database\\InvalidQueryException: "Query condition 'ti.tid IN ()' cannot be empty." at /var/www/html/drupal/core/lib/Drupal/Core/Database/Query/Condition.php line 103, referer: http://localhost/drupal/system/403
Comment #5
nielsvoo commentedOn my site it appears when anonymous visitors try to open a page containing a view based on items with Term rights.
In other words:
- administrator role works fine
- users with roles can see the page but items on it (the ones labeled with Term rights) wont be displayed.
Hope this helps.
Comment #6
prathibhab.cdac commentedThe login page is not getting loaded. Instead it only shows "Website encountered an error"
Comment #7
jepster_The recent version is 8.x-1.25. Please check this one. I got no problem with it and run all my behat tests on it.
You have mentioned 8.x-1.24. That's an old version.
Comment #8
jepster_https://www.drupal.org/project/permissions_by_term/releases/8.x-1.25
Comment #9
prathibhab.cdac commentedI'm getting the error with the latest version 8.x-1.25. Thats why I checked with the previous version.
Comment #10
nielsvoo commentedi have this error after installing 1.25 (no dev version), the previous version 1.22 works fine
Comment #12
jepster_There has been a simple if-case missing. I have pushed the change into the latest development version: https://www.drupal.org/project/permissions_by_term/releases/8.x-1.x-dev. Please check it. If you have no objection, I will put this into the release soon.
Thanks for reporting.
Comment #13
prathibhab.cdac commentedI've tested with the latest version from git. Its working fine now.
Comment #14
jepster_Thanks. I have created release 8.x-1.26 with the fix in it.
Please check the issue Automated Tests, if you like to contribute.
Comment #15
nielsvoo commentedthanks for all the help!
Comment #16
nielsvoo commentedSorry there is still something wrong.
I've rebuild the permissions and some items are displayed. But only the items labeled to a roll. The normal behavior in Drupal were items not labeled at all will be available to all users (no matter there roll) isn't working now.
Comment #17
jepster_@nielsvoo: I do not understand, what you mean. Especially the world "roll" confuses me. This is not a Drupal term.
If you rebuild the permissions, restricted nodes will not be shown to users which do not have access to them. These nodes will be not listed in views, menus and search results. Could you please describe your issue more detailed? Any screenshots may help.
Comment #18
jepster_May the documentation can help you: https://www.drupal.org/docs/8/modules/permissions-by-term. Just as hint.
Comment #19
nielsvoo commentedOk i give it a try:
in version 1.22 the behavior is:
Taxonomy
term "dummy" = connected to user role "internal"
Node
node "1" = Connected to Permission Term (dummy)
node "2" = Not connected to any permission
All users connected to user role (internal) will see node "1" and node "2"
All other users get only node "2"
Now in the new version 1.2.6 the behavior is:
Taxonomy
term "dummy" = connected to user role "internal"
Node
node "1" = Connected to Permission Term (dummy)
node "2" = Not connected to any permission
All users connected to user role (internal) will see just node "1"
All other users get's empty pages
Thanks,
Niels
Comment #20
jepster_OK, this description is clear. I will check this asap.
Comment #21
nielsvoo commentedOk thank you..
Comment #22
jepster_You are welcome. Thanks for reporting.
Comment #24
darin73 commentedSame problem as #19, also with version 1.26
Comment #25
jepster_Yep, I am on it. The fix will come soon. May this evening (central european time).
Comment #27
jepster_I have fixed the error described in #19 from nielsvoo in version 8.x-1.27. See release note: https://www.drupal.org/project/permissions_by_term/releases/8.x-1.27.
Please test the current version and open an issue, if you find any problem.
Thanks again for reporting.
You can find the updated Behat features for automated tests at https://github.com/jepster/permissions-by-term-behat.
Comment #28
darin73 commentedThe release 8.x-1.27 fix the problem.
thanks
Comment #29
jepster_I'm glad to read this. Thanks for testing.
Comment #30
nielsvoo commentedThanks Peter,
Installed version is correct now!
Nielsvoo
Comment #31
jepster_I am glad to read this. Thanks for testing nielsvoo! :)
Comment #32
nielsvoo commentedYou're welcome.
I've upgraded to 1.28 and this one is working fine also, although there is still one challenge. Since the upgrade i have to rebuild permissions all the time otherwise new users still get empty pages?
I didn't check this behavior in 1.27 so it maybe there also. Until now 1.22 is still the version in my production environment because of this. Every day thousands of users visits the pages on this site and new ones are created every day. This is all completely automated by Single Sign On techniques and user role provisioning. Therefore users have to see their items immediately after login, even for the first time.
Have you got any explanation why rebuilding the user rights is needed for this?
Comment #34
jepster_Yes, you are right. Since the node access records aren't tied to users anymore, I have removed this in the dev version. Good that this project has pro-active users, with large sites. :)
Comment #35
jepster_I have published the fix in 8.x-1.29: https://www.drupal.org/project/permissions_by_term/releases/8.x-1.29.
Comment #36
nielsvoo commentedHe Peter,
Unfortunately no success. With the new update even the admin gets empty pages. What was wrong with version 1.22 as this one seems to work flawless?
Nielsvoo
Comment #37
jepster_Hi Nielsvoo,
I am sorry to read your objection. Please help me to reproduce your issue. I cannot reproduce it so far.
When do you have to rebuild the permissions? Please be so kind and provide a "step-by-step" introduction, which allows me to reproduce your issue. It is not necessary anymore, to recreate permissions, after any user account has been created or any user account has been updated. Because the node access records (database table: node_access) are created after an new node has been created. The node access records are created in relation to nodes "only". Not to user accounts "and" nodes via node_access table.
In 1.22 has been a large performance draw back. Node access records have been created in relation to nodes "and" users. Therefor an huge amount of node access records has been created on large Drupal sites. The node access rebuild process took very long. Now the processing time has been reduced massively.
I am looking forward to your description.
Thanks!
Peter
Comment #38
jepster_@nielsvoo: Please be so kind and let's community further in this issue: https://www.drupal.org/node/2905328. I have quoted you there. Since the initial problem from this issue, has been fixed.
I am closing this issue.
Comment #39
nielsvoo commentedHi Peter,
Good news, i saw there was an error with entity dependencies after upgrading, i completely uninstalled the module en reinstalled the new 1.29 version, now the error is gone and it seems to work all fine.
Thanks for all the great help, you are definitely a serious maintainer, keep up the great work.
Nielsvoo
Comment #40
jepster_Thanks. :)