If view named "learning_path" or "lpath"
and asset name used in JTable is component.lp.id
I'd like to avoid issues with getting my site down every time I change permission
/media/system/js/permissions.min.js
searches for asset name component.view.id
which results in component.learning_path.id
instead of component.lp.id
and new asset record added to table with parent_id = 0
May be solution is allowing to manipulate with asset name via js, allowing to influence everything except the component.
for security and extensions encapsulation reasons.
var asset_name_postfix_var = getUrlParam("view");
In /media/system/js/permissions.min.js use:
var asset_name = "component."+asset_name_postfix_var;
Category | ⇒ | JavaScript |
IMHO, you're right. It's not correct to use the url parameters to determine the asset key.
unless i'm mistaken, it should use the typeAlias
property of the component item model.
BTW in 3.6.0 there is no /media/system/js/permissions.min.js
file. The files are:
1 . For requirement in JS to have 'jform_title', for forms that do not have, i am adding a hidden empty field with id:
jform_title
2 . For the view naming issue, i am manipulating the posted data ... when needed ... to work around it, i don't know if you would like to make a PR for this too, i will test too
3 . Finally, about:
and new asset record added to table with parent_id = 0
if 2 assets with parent_id = 0, are created (due to software bugs), then ACL no longer works
For requirement in JS to have 'jform_title', i am adding a hidden empty field:
Why? Why is core creating hardcoded requirements to explicit form fields being present? Why are our JavaScript APIs not open to have these things customized as needed? We're creating a lot more JavaScript based integrations in core and we're making a lot of the same mistakes as exist with our PHP code, creating hardcoded requirements on certain conventions without introducing mechanisms to change those hardcoded values for scenarios that they don't exist in.
Labels |
Added:
?
|
Labels |
Removed:
?
|
Labels |
Added:
?
|
Status | New | ⇒ | Needs Review |
Labels |
Added:
J3 Issue
|
Thank you for raising this issue.
Joomla 3 is now in security only mode with no further bug fixes or new features.
As this issue doesn't relate to Joomla 4 it will now been closed.
If we are mistaken and this does apply to Joomla 4 please open a new issue (and reference this one if you wish) with updated details for testing in Joomla 4
cc @zero-24
Status | Needs Review | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-08-23 10:13:31 |
Closed_By | ⇒ | zero-24 | |
Labels |
Added:
No Code Attached Yet
Removed: ? |
Temp solution
For those who might run into this issue here is solution for this kind of situation:
And may be
If you have
c_title
for some reason instead oftitle
.But remember: having
anything_title
instead oftitle
is a BAD HABBIT