Closed (fixed)
Project:
Title
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Jul 2011 at 13:34 UTC
Updated:
13 Jun 2014 at 23:38 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
claudiu.cristeaGetting the same error.
Comment #2
claudiu.cristeaI found thet this occur only when the "Description" text area is empty. If you fill something there the error doesn't popup. So there must be a check somewhere in the code but lacks.
Comment #3
claudiu.cristeaAnd here's a patch
Comment #4
claudiu.cristeaAlso this error occur on taxonomy_term entities when the description is replaced and the "Process text" of the description_field is set to "Plain text" and there's a value entered as description.
Don't have time to fix or patch (I'm not using anymore that kind of setting) but I just waned to let you know about the bug.
Comment #5
das-peter commentedThis exception is triggered if the content of a "text_with_summary" field replacement is synced into the property - but there is no content available (in the current language).
E.g. if you create a taxonomy term in English, and then you try to edit it in German without an existing German translation, the function
title_field_text_with_summary_sync_get()tries to set the, not existing, German description and filter value into the original properties.I've added a condition which checks if there are usable data before accessing them.
Comment #6
renat commentedDas-peter, hi again!
Your patch from #5 works just fine for me.
Comment #7
plachI'm not able to reproduce this, but the check looks good so I committed #5 with an updated comment.
Comment #8
plachWe need test coverage for this.
Comment #9
ptaff commentedSubscribing; similar problem, even with current -dev version (with comment #7 patch already applied):
EntityMetadataWrapperException: Unknown data property format. in EntityStructureWrapper->getPropertyInfo() (line 328 of .../modules/entity/includes/entity.wrapper.inc).Exception is thrown from line 132, in function
title_field_text_with_summary_sync_get():$entity->{$format_key} = $wrapper->{$field_name}->format->raw();Trying to find the culprit, I discovered the
$entity_typearray passed to the function has an emptyentity_type['name_field']['und'][0]['format'].Patch attached to do that additional check.
Comment #10
plachI'm still unable to reproduce the bug. Please someone post the exact steps to, possibily from a clean D7 install.
Comment #11
renat commentedUnfortunately I can't post instruction to reproduce this problems on fresh install. First of them appeared (in my case) on the relatively old site with many modules enabled (by the way, earlier there were no problems with term creation, and Title module was there yet). And with current -dev I have no problems, so don't know, what should you do to reproduce ptaff's issue.
Comment #12
das-peter commentedNot sure if the problem I just came across has to do with this issue, but it has definitely the potential.
title_entity_language()tries to fetch the language property from the entity. But e.g. taxonomy terms don't have such a property.For that case the title module falls back to
LANGUAGE_NONE.Unfortunately this conflicts with the fallback/default of entity_translation - thus I've added a check to see if entity_translation can be used for the fallback.
Comment #13
plach@das-peter:
This is another issue: originally ET was supposed to integrate with Entity API and provide a
languageproperty for any entity it handles. This would avoid the exception here without the need to introduce an explicit dependency. However now we have a couple core issues that need to introduce the concept of entity language:#1253820: It's impossible to submit no value for a field that has a default value
#1260640: Improve field language API DX
Hence I'm going to deal with this in a different way.
Comment #14
renat commentedLooks like patch has gone away from alpha1, so after upgrading I faced the same problem again. Applying patch from #7 still solves it, so, please, consider committing it against this version.
And yes, alpha1 is notably smaller than -dev from 2011-Aug-21, so, probably, not only this patch was lost.
Comment #15
plach@renat:
Thanks for reporting, alpha2 will be out in minutes with all what was meant to be in alpha1.
Comment #16
vasikei can confirm the #9 error but i don't think it's related with the entity translations.
this issue it seems related with taxonomy term reference fields somehow.
in my case it's about a product with title replaced and some term references of taxonomies with custom fields
please, can anyone tell me about this line within the title_field_text_with_summary_sync_get function
what does it suppose to do?
Comment #17
zy commentedCan confirm #9 error and patch by pfaff worked.
Not so old but already crowded installation with taxonomy entity translation and taxonomy reference fields (not entity reference fields! - used entity reference on same installation/configuration, but could not wrap my head around usage in views. No errors though).
The error did not show up with initial config but after trying to change format to "plain text" for taxonomy description field.
Using WYSIWYG - can it be the reason, or at least adding upp to the problem?
Comment #18
plachWould you please see if the latest dev fixes the issue?
Comment #19
steinmb commentedTested with latest dev. No error messages of any kind.
Comment #20
plachOk, thanks.
Comment #21
siggi_hrafn commentedI get a failed warning on patching title.module with #12 patch in terminal on mac. Seems like the function has a different line number my title.module file
Here is the terminal output:
title.module ->function:
I'm not a programmer ;) Where should the patch + lines added in this function?
Comment #23
chidosoft commentedpls I have this problem EntityMetadataWrapperException: Unable to get the data property format as the parent data structure is not set. in EntityStructureWrapper->getPropertyValue() (line 438of /home/www/imydomainname.com/sites/all/modules/entity/includes/entity.wrapper.inc).
pls tell me how you where able to resolve it