Problems with Can Edit Row and Can Delete Row list plugins

If I set the options for Element, Operator and Value, the plugins work as expected. However, doing it that way overrides the list's ACLs and I only want to use the element value to prohibit editing and deleting of the record and to leave enabling them to the ACLs. I added PHP (eval) code based on the example in http://fabrikar.com/forums/index.php?wiki/can-edit-row-list-plugin/, but cannot get it to work.

As far as I can see, the function onCanEdit in caneditrow.php successfully fetches the PHP eval code, creates a new FabrikWorker object and calls its parseMessageForPlaceHolder function. The return from that is unchanged and no substitution of the placeholder occurs, so the test in the eval code does not work. As far as I can determine, the parseMessageForPlaceHolder function in Worker.php does not actually run at all, although if I add a call to the FabrikWorker’s getViewTypes function to caneditrow.php, I can see that getViewTypes in Worker.php does run. (candeleterow.php seems to be similar.)

I am slightly puzzled by the fact the Worker.php defines the class Worker, not FabrikWorker; I cannot find any definition of the latter.

As I still have the Fabrik3 version of the site running, I tried that and found the same problem occurs. Presumably it must once have worked for the example to be in the wiki. Have I got confused again and am doing something wrong?
 
It's working fine in F3 and F4.

Make sure to have the correct element name {table___element}, element is published, maybe you have to use {table___element_raw}
 
Thanks. The problem was extra underlines between element and raw. I have also worked out the mistake that made me think the call to parseMessageForPlaceHolder was not happening. Sorry to have troubled you.
 
No problem.
Moved to Community Help.

Worker /FabrikWorker: There's an alias somewhere...
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top