• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Sorry you are not authorized to edit this record!

Status
Not open for further replies.

gnavarro

Member
Hi,

Suddenly one of my user groups stop having access to edit records for one specific list!

In this list the user only can edit 3 fields (one is yes/no and the other 2 show wen selecting yes in the first one). when editing records and no changes are applied if we click on submit, the form submits and redirects to the list as expected. But if when editing we change the yes/no element value and try to submit, the form returns the message "Sorry you are not authorized to edit this record"!

You can test this in the following list using the FisioLAR COLAB login access that you can find in my sites:
https://www.fisiolar.pt/index.php/pt/tratamentos-fisioterapia

Please edit one of the records and change the element 'Conclu?do' to 'sim'(yes) and try to submit.

All list and yes/no element access parameters are correct and unchanged so why am I seeing this message? Am I missing something?
 
Clicking on "Sim" you'll get JS errors
"Cannot read property 'update' of null"
it's trying to update fb_tratamento_fisiot___notific

Not sure if this is the reason.
 
Hi Troester,

Thanks for your help!

I've unpublished that JS part in the element and the bug persists. Also unpublished element fb_tratamento_fisiot___notific and bug persists.

What other things could generate this anomaly?
 
It's not a "bug", it's a "feature".

You have a 'caneditrow' plugin, which requires "Concluido" to equal "0" to allow editing.

If you look at that plugin, there's an option, "Run on Submit", the tooltip for which says ...

By default, this plugin will run as part of ACL checking on form submission. If you are using a form element that a user can change (so may be set to a value that prevents editing on submission), you will need to set this to No.

... which pretty much sums it up. By default, we run the caneditrow plugin on form submission (not just on load or in list view) to prevent people from directly submitting edits to rows they aren't allowed to edit. But as the tooltip says, if you allow users to modify the element you are using for the access control, and they change it to a value that prevents access ... well, you can see what happens.

I've set that option to No.

I've also set the option below that, "Run on Failed Validation", to No, for similar reasons:

If you allow your users to modify the element which controls edit access, you may wish to set this to No, otherwise if they submit the form with this element set, and the form fails validatoin, the resulting reload won't let them edit any more.

-- hugh
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top