Two error messages will lead you here:
Unsupported operand types in form_get_cache() in includes/form.inc
(core patch for that: https://www.drupal.org/files/issues/2019-11-04/php7.3_edge_case_closure_...
#2819375-121: Do not make entries in "cache_form" when viewing forms that use #ajax['callback'] (Drupal 7 port)
AND
Too few arguments to function views_form(), 2 passed in /includes/form.inc and exactly 4 expected in views_form() line 1938 of views/views.module
Attempted the following (causes regression):
Step 1) Use php 7.3.x (this solution should also work on previous versions of php which are not affected).
Step 2) patch core (includes/form.inc) with this core patch
Step 3) patch the editablefields module with this editablefields patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | php7x3x_compatibility_got_2_parameters_4_parameters_expected-3093423-2.patch | 1.21 KB | joseph.olstad |
Comments
Comment #2
joseph.olstadComment #3
joseph.olstadto fix, apply this patch and the mentioned core patch.
Comment #4
joseph.olstadComment #5
joseph.olstadComment #6
joseph.olstadComment #7
joseph.olstadComment #8
joseph.olstadI found a a regression.
if saving the form with the ajax editablefield and the ajax has fired, notices and warnings are thrown by the views module
back to debugging.
Comment #9
joseph.olstadComment #10
joseph.olstadI did more analysis/testing, using php 7.3.x I disabled the views_php module that is using a patch which requires the opis/closure library that does serialize/unserialize on the php code and no more problem.
the cause of this problem is the use of the opis/closure library which is required by a patch I'm using that substitutes create_function that was removed from php 7.2.x, however the manifestation of this bug seems to only affect php 7.3.x in this situation.
the opis/closure library serializes a closure, at some point the ajax form gets cached , drupal_get_cache unserializes the cached form data and that's where the unserialize error pops in. From there, it's a cascading set of things that happen.
Comment #11
joseph.olstadthis is a very cool module by the way, very nice! I removed the fields that contained views_php and now there's no issues.
Comment #12
joelpittetOh that sounds like a rabbit hole you fell into, I'm glad you made it out the other side @joseph.olstad!