-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
dev/joomla#35: J4 permission fix #67
Conversation
This patch improves the behavior (no error on permissions screen, normal notices & tabs now appear), but does not list, or let the user set, any permissions. So – unless I'm missing another part of this – this doesn't fix the broken permissions in J4 – Civi permissions still can't be set. |
9892427
to
7cb2fd2
Compare
@vingle I have now taken a different approach to fix the J4 permission block issue. Here's a demo after the latest change: Can you please reapply the patch and try again? |
Hi @monishdeb – that's fixed it for Joomla 4.0. I also tested a couple of basic permission changes (not a full permission test) and they worked as expected. However, Joomla 3 is now giving me an error when trying to load this screen:
NB - I'm just adding this patch to an existing J3/J4+Civi – am not building it from buildkit. |
Thanks @vingle for your feedback. I'll update the patch for J3 and let you know about this. |
@vingle can you please review the updated PR? |
Thanks @monishdeb and @JoeMurray
In other words - yes, this works. But would advise Joomla+Civi users to double check any custom permissions still behave as expected as there's been a change to the code around them. I did a few spot tests on the last version of this and they did work as expected, but as permissions have a big cost associated when they break and there's many of them, maybe wise to flag more tests are worthwhile. |
Pinged in MM Joomla channel that additional testing would be appreciated. |
On the latest J4 and Civi this is now giving an error again. I'm not sure what changed - I've reapplied this PR and still get:
|
@monishdeb can you work on this again? |
@vingle I am unable to replicate the error on my J4 setup. To further safeguard the file inclusion I had earlier thought of adding an additional condition like: - if (!version_compare(JVERSION, '4.0.0', 'ge')) {
+ if (file_exists(JPATH_SITE . '/libraries/joomla/form/fields/rules.php')) { but then I think version_compare would be enough in this case. Can you please ensure after reapplying the patch if this condition is present in your |
@@ -2,8 +2,12 @@ | |||
|
|||
defined('JPATH_PLATFORM') or die; | |||
|
|||
// for some reason Joomla doesn't autoload JFormFieldRules in this context | |||
require_once JPATH_SITE . '/libraries/joomla/form/fields/rules.php'; | |||
if (!version_compare(JVERSION, '4.0.0', 'ge')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@monishdeb is there a reason not to do this instead because it is kind of like your say if not greater than this instead of if less than this
if (!version_compare(JVERSION, '4.0.0', 'ge')) { | |
if (version_compare(JVERSION, '4.0.0', 'lt')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope just copy paste code :) but yeah would be good to use that, I have (force)updated the PR with file_exists
condition now.
c54377c
to
7c0a752
Compare
That's fixed it - thank you! |
@seamuslee001 after you are satisfied and PR merged please close this and the associated issue. Thx. |
merging as per @vingle 's testing |
No description provided.