fatal error "operation not allowed" after checking checkbox and try to do table update

Questionsfatal error "operation not allowed" after checking checkbox and try to do table update
Willy Hendrickx asked 1 month ago

Hello,

I just did the upgrade from phpgrid version 1.5 to 2.9 to be PHP 8.3 compliant.

I try to run my application and encounter a few problems.

One of these is the error “Operation not allowed” after I checked a checkbox and tried to do a table update. This was working in the previous version.

see printscreen (https://imgur.com/a/z3Osd9j): when I check the checkbox “VOORGESTELD” after the name HENDRICKX WILLY I get the error message “Operation not allowed”.

JQGRID_DIST.PHP

Case “edit”:

      …

      // check for crafted ajax call – moved below on_update because it is used in bulk update as well
      if (!$this->actions[“edit”] && !$this->options[“cellEdit”] && !$this->actions[“bulkedit”])
          phpgrid_error(“Operation not allowed”);

I have send this problem already several times to the emailaddress gridphp@gmail but never received an aswer

1 Answers
Abu Ghufran Staff answered 1 month ago

Hello,

If you wish to enable the edit operation, you must set: edit action to true in set_actions() method. This validation is added in later versions to avoid manual ajax post which may change the data.

e.g. where $g is grid object.

$g->set_actions(array(
“add”=>false, // allow/disallow add
“edit”=>true, // allow/disallow edit
“delete”=>true, // allow/disallow delete
…..)
);

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

1 + 2 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?