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.
When I post a new question, drupal shows a messages as below:
Notice: Undefined property: stdClass::$field_answer_count at locale_field_entity_form_submit() (line 443 at /opt/test/modules/locale/locale.module).
Comment | File | Size | Author |
---|---|---|---|
#3 | 0001-Issue-2032121-Fix-problem-with-locale-and-field_answ.patch | 1.03 KB | chipcleary |
Comments
Comment #1
chipcleary CreditAttribution: chipcleary commentedWhich version of core are you using?
The background: According to #1062072: Notice : Undefined property: stdClass::$field_name_of_the_field in locale_field_node_form_submit(), this is an issue in core. The issue is in progress here #822418: Field form structure incomplete if field_access() returns FALSE. You should be able to eliminate it by using these directions:
http://drupal.org/node/1062072#comment-5043284
That said, this was old news. The issue trail indicates that the problem in core was apparently fixed in Drupal 7.15 back in Aug 2012. If you are using the current version of core, it looks like it should have been resolved.
Comment #2
garamani CreditAttribution: garamani commentedThanks chipcleary,
I'm using the 7.22 version of drupal so the reason of Error is probably not related to the core issues.
@alevelweb
have you resolved the problem?
Comment #3
chipcleary CreditAttribution: chipcleary commentedIt turns out that the patch to locale indicated above will fix the issue.
However, it is not clear to me whether that patch really is for a bug in core or a work-around for another problem. The underlying issue is that $field_answer_count (a node reference count field) was not getting an initial value set and locale expects one.
I've patched answers with a work-around that eliminates the problem.
Comment #4
garamani CreditAttribution: garamani commentedThanks,
The error disappeared but now a warning message appear:
Is this warning serious? or ignorable?
Comment #5
chipcleary CreditAttribution: chipcleary commentedHi @garamani, could you tell me what version of AUP you are using? I will see if I can duplicate this.
Comment #6
garamani CreditAttribution: garamani commentedHi chipcleary
AUP version is: 7.x-1.1+1-dev
Answers version is: 7.x-3.0+21-dev
Comment #7
chipcleary CreditAttribution: chipcleary commentedOK, thanks. I did duplicate this. It turns out to be a known issue. The resolution and explanation are here:
https://drupal.org/node/1792166#comment-6567496
The fix is already included in AUP 7.x-1.x-dev. (Please note that you must use the dev version when following the instructions in the comment).
That said, it's bad that the 7.x-1.1 version has a show-stopper bug in it. I will release a new version that has the fix incorporated.
Comment #8
garamani CreditAttribution: garamani commentedThanks for quick answers and quick fixes, keep it up
Yes, The solution you mentioned in that comment resolved the problem in the blink of an eye!
for those who wanna know how:
1.install devel module
2.go here: structure>blocks and enable "development" block
3.click on "Reinstall modules"
4. tick "aup" check box and click on "reinstall" button
Thanks again
Comment #9
chipcleary CreditAttribution: chipcleary commented