Hello,
I'm integrating a custom entity with the entity translations system where I'm using a custom access callback for the edit page. This custom access callback has no arguments.
In entity_translation_menu_alter()
lines 454, 456, 467, 469, 485 and 489, the code assumes that page arguments
and access arguments
are arrays, however, that's not always true.
In case one of those arguments are not defined in the original menu item, those values are not defined, and the call to array_merge()
fails and page arguments
and access arguments
in the new menu item are NULL
, so the data is corrupted.
So data is corrupted in entity_translation_edit_access()
and entity_translation_edit_page()
because func_get_args()
is an empty array.
Thank you.
Comment | File | Size | Author |
---|---|---|---|
#4 | entity_translation-instantiate_menu_arguments-2536292-4.patch | 981 bytes | stefanos.petrakis@gmail.com |
|
Comments
Comment #1
plopescAttaching patch that ensures those values are always an array.
Regards
Comment #2
plopescComment #3
pedrospI had the same messages each time I used drush:
Your patch make them away for good, it should be considered for release IMHO.
Comment #4
stefanos.petrakis@gmail.comThanks to all people involved for helping out with this so far.
The patch in #1 does solve the problem. However, we should use the
+
array operator to be more compact and readable, I attach a patch that implements this.@pedrosp: If you would be so kind to test against this latest patch, we can RTBC this.
Comment #5
stefanos.petrakis@gmail.comHaven't heard back about this, I am going to RTBC this and commit soon.
Comment #7
stefanos.petrakis@gmail.comCommited and closed. Thanks to everyone that helped!