Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
Creating a new node with some fields hidden by field permissions module in the node creation form, I get the following warning on submit :
Notice : Undefined property: stdClass::$field_name_of_the_field in locale_field_node_form_submit() (line 410 in /home/zion/public_html/dev/modules/locale/locale.module).
It seems like the locale core module needs all the node fields to exist on a new content submission.
Also the content is correctly saved but I need to not display these error to my end users.
Please help !!
Thanks
Comment | File | Size | Author |
---|---|---|---|
#17 | locale.undefinedpropertystdClass-1062072-12c.patch | 685 bytes | trailerparkopera |
#16 | locale.undefinedpropertystdClass-1062072-12b.patch | 706 bytes | trailerparkopera |
#15 | locale.undefinedpropertystdClass-1062072-12.patch | 723 bytes | trailerparkopera |
#14 | locale.module.patch | 803 bytes | trailerparkopera |
Comments
Comment #1
webflo CreditAttribution: webflo commentedI think this is a bug in core. #822418: Field form structure incomplete if field_access() returns FALSE
Comment #2
bryancasler CreditAttribution: bryancasler commentedsubscribe
Comment #3
clashar CreditAttribution: clashar commentedI have similar problem while node creation:
Notice: Undefined property: stdClass::$field_edu in locale_field_node_form_submit() (line 410 of Z:\home\paris9.kz\www\emploi\modules\locale\locale.module).
But I have no Field Permissions module.
I do have Fieldgroup, Field collection modules.
Comment #4
clashar CreditAttribution: clashar commentedshould this issue be related to Locale module?
Comment #5
didox CreditAttribution: didox commentedsubscribe
Comment #6
RobLoachYeah, this seems like a Locale module bug, as webflo stated.... #822418: Field form structure incomplete if field_access() returns FALSE
Comment #7
tobey_p CreditAttribution: tobey_p commentedsubscribe
Comment #8
Muuss CreditAttribution: Muuss commentedNotice : Undefined property: stdClass::$field_renouv_numero_dsi dans locale_field_node_form_submit() (ligne 409 dans /data/html/drupal/modules/locale/locale.module).
Using the lastests versions of Drupal, of Field Permissions and Fieldgroups, I have that same issue. It disappears if I add a 'Create field_renouv_numero_dsi (edit on content creation).', tho, it changes the behaviour of what i want to do (ie : add fields that are viewable and modifyable only by a special group).
Comment #9
SebCorbin CreditAttribution: SebCorbin commentedSubscribing
Comment #10
snupy CreditAttribution: snupy commentedsubscribe
Comment #11
webadpro CreditAttribution: webadpro commentedI'm having the same issue.
Comment #12
aacraig CreditAttribution: aacraig commentedYou can remove this error message by patching the code, until the developer gets around to a permanent fix.
Replace the current line (line 408 in my current version 7.8, but mileage may vary according to your installed version of the Locale module)
with:
Comment #13
manos_ws CreditAttribution: manos_ws commentedThe temporary fix from #12 worked
has anyone tryied the patch in #822418: Field form structure incomplete if field_access() returns FALSE and verify that it solves the issue?
Comment #14
trailerparkopera CreditAttribution: trailerparkopera commentedHere's a patch that works for me
Comment #15
trailerparkopera CreditAttribution: trailerparkopera commentedwhoops! Bad naming on that patch. Here's a revised one.
Comment #16
trailerparkopera CreditAttribution: trailerparkopera commentedbah! Bad path...trying again...
Comment #17
trailerparkopera CreditAttribution: trailerparkopera commentedNope. Bad paths again...this one works (sure do wish I could delete - or mark for deletion) my other comments - or at least re-attach files).
Comment #18
hollyh CreditAttribution: hollyh commentedHi I like your patch, unfortunately it is not working for me. I am using the latest version of drupal and the error I get is on one of these lines
if ($field['translatable'] && $previous_language != $current_language && isset($form_state['values'][$field_name])) {
$form_state['values'][$field_name][$current_language] = $node->{$field_name}[$previous_language];
$form_state['values'][$field_name][$previous_language] = array();
}
Any guesses? I am not a programmer so this is a bit over my head
Comment #19
trailerparkopera CreditAttribution: trailerparkopera commentedThis patch is no longer working against the current version of D7 / Locale. I'm trying to track down if it's needed anymore.
Comment #20
arlingtonvoicellc CreditAttribution: arlingtonvoicellc commented#12
works for mehides the error but doesn't fix the internal problem. For some reason, it won't pass any image file upload fields or address fields when saved. But it does get rid of the error message.Comment #21
fen CreditAttribution: fen commentedWe discovered problems with this patch around Aug 17th and have commented it out in our drush make file. Everything seems to still be working...