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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webflo’s picture

bryancasler’s picture

subscribe

clashar’s picture

I 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.

clashar’s picture

should this issue be related to Locale module?

didox’s picture

subscribe

RobLoach’s picture

Status: Active » Closed (duplicate)

Yeah, this seems like a Locale module bug, as webflo stated.... #822418: Field form structure incomplete if field_access() returns FALSE

tobey_p’s picture

subscribe

Muuss’s picture

Notice : 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).

SebCorbin’s picture

Subscribing

snupy’s picture

subscribe

webadpro’s picture

I'm having the same issue.

aacraig’s picture

You 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)

if ($field['translatable'] && $previous_language != $node->language) {

with:

if ($field['translatable'] && $previous_language != $node->language && isset($form_state['values'][$field_name])) {
manos_ws’s picture

The 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?

trailerparkopera’s picture

FileSize
803 bytes

Here's a patch that works for me

trailerparkopera’s picture

whoops! Bad naming on that patch. Here's a revised one.

trailerparkopera’s picture

bah! Bad path...trying again...

trailerparkopera’s picture

Nope. 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).

hollyh’s picture

Hi 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

trailerparkopera’s picture

This patch is no longer working against the current version of D7 / Locale. I'm trying to track down if it's needed anymore.

arlingtonvoicellc’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta2

#12 works for me hides 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.

fen’s picture

We discovered problems with this patch around Aug 17th and have commented it out in our drush make file. Everything seems to still be working...