Closed (fixed)
Project:
Custom Formatters
Version:
7.x-2.0
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Jul 2011 at 14:00 UTC
Updated:
18 May 2012 at 11:10 UTC
Steps to reproduce:
After step 5, you'll see the following (non-fatal) errors:
Notice: Undefined index: entity keys in entity_extract_ids() (line 7372 of /includes/common.inc).
Notice: Undefined index: entity keys in entity_extract_ids() (line 7373 of /includes/common.inc).
Notice: Undefined index: entity keys in entity_extract_ids() (line 7376 of /includes/common.inc).
Notice: Undefined index: field_name in field_language() (line 275 of /modules/field/field.multilingual.inc).
Notice: Undefined index: field_name in field_language() (line 275 of /modules/field/field.multilingual.inc).
Notice: Undefined index: field_name in field_language() (line 275 of /modules/field/field.multilingual.inc).
Notice: Undefined index: field_name in field_language() (line 275 of /modules/field/field.multilingual.inc).
Notice: Undefined index: field_name in field_language() (line 275 of /modules/field/field.multilingual.inc).
Notice: Undefined index: field_name in field_language() (line 275 of /modules/field/field.multilingual.inc).
Notice: Undefined index: field_name in field_language() (line 275 of /modules/field/field.multilingual.inc).
Notice: Undefined index: field_name in field_language() (line 275 of /modules/field/field.multilingual.inc).
Notice: Undefined index: field_name in field_language() (line 275 of /modules/field/field.multilingual.inc).
Notice: Undefined index: field_name in field_language() (line 275 of /modules/field/field.multilingual.inc).
Notice: Undefined index: field_name in field_language() (line 275 of /modules/field/field.multilingual.inc).
Notice: Undefined index: field_name in field_language() (line 275 of /modules/field/field.multilingual.inc).
Notice: Undefined index: entity keys in entity_extract_ids() (line 7372 of /includes/common.inc).
Notice: Undefined index: entity keys in entity_extract_ids() (line 7373 of /includes/common.inc).
Notice: Undefined index: entity keys in entity_extract_ids() (line 7376 of /includes/common.inc).
More importantly, after step 6, you'll see a WSOD with the following fatal error:
Recoverable fatal error: Object of class stdClass could not be converted to string in form_get_cache() (line 474 of /includes/form.inc).
It comes from custom_formatters_insert_content(), which passes form_get_cache() with a node object, but form_get_cache() is expecting a string.
Comments
Comment #1
joelstein commentedThere's a similar issue for D6... not sure if it's related, though.
#1177584: no longer works with Insert
Comment #2
decipheredUnable to reproduce, can you please clarify the steps?
What is the default "image" formatter? Custom Formatters comes with two default image formatters, 'Example: Image (PHP)' and 'Example: Image (HTML + Token)'. Was it one of them? I tested with both and it worked as expected.
Cheers,
Deciphered.
Comment #3
joelstein commentedHmm, when I download the latest 7.x-2.x-dev, I only see "Example: Image (PHP)" as the default formatter. Are you testing this against D6 or D7?
FYI: I just tried it again with the latest dev, and produced the same results as originally reported.
Comment #4
decipheredThe issue says 7, therefore I'm testing 7.
The Token based example will only be present if the Token module is present.
Well the testing I did was unable to reproduce the issue, so I will need either more detailed information or access to a site that can reproduce the issue before I can proceed.
Cheers,
Deciphered.
Comment #5
joelstein commentedI don't have Token enabled on this site. In fact, it's just a vanilla installation of Drupal 7.8 (standard installation profile), Custom Formatters 7.x-2.x-dev, Insert 7.x-1.1, and Ctools 7.x-1.0-rc1.
I enabled Token 7.x-1.0-beta5, and now I see the "Example: Image (HTML + Token)" formatter. However, the error still occurs with the first formatter.
I'll setup a sandbox and send you the link so you can see it in action.
Comment #6
decipheredFixed and committed to 7.x-2.x.
Cheers,
Deciphered.
Comment #8
dlnsk commentedDrupal 7.12, Custom Formatters 7.x-2.0 (downloaded today), Insert 7.x-1.1, Token 7.x-1.0-rc1, and Ctools 7.x-1.0-rc2.
When I enable any default formatter or add own for image field and allow to use it in imagefield options of content type (see steps 1-6 from first post). When I try open edit form of node I see next fatal error:
Recoverable fatal error: Object of class stdClass could not be converted to string in function form_get_cache() (line 489 in file /var/www/includes/form.inc).
I was try to use 2.x-dev version of Custom Formatter. This version don't rise current error but when I try to insert image by clicking on "Insert" button nothing is happens.
Comment #9
dlnsk commentedAfter step 5 I see this:
Comment #10
alexkb commentedSeeing the same issue here. I'm not using the default formatters, just my own, but after checking these thoroughly and making sure they all had conditional checks to only get used if the data existed (i.e. to avoid php notices that might trigger the fatal error if an eval()), I still had the issue. Proceeded to disable the insert module, as it didn't actually end up getting used, and the issue went away. One thing to point out, the error only occurred when editing content of content types that had fields, that didn't use the custom formatters.Sorry, I was using 2.0, not 7.x-2.x where Deciphered has already made the fix.
Comment #11
Taxoman commentedSo use the -dev version until 2.1 gets released.
(Which it should be "asap", as the "Recommended" status is misleading now)