Closed (fixed)
Project:
Entity API
Version:
7.x-1.x-dev
Component:
Code - misc
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Oct 2013 at 01:21 UTC
Updated:
11 Mar 2015 at 15:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedIt looks like EntityDefaultUIController::hook_menu() calls drupal_get_form with NULL instaed of an entity. entity_ui_get_page_title() crashes when trying to get the label. There is a fix in the attached diff.
Comment #3
Anonymous (not verified) commentedAdded patch
Comment #4
Anonymous (not verified) commentedComment #5
Anonymous (not verified) commentedComment #6
ruscoe commentedRefactored entity_ui_get_page_title to avoid function call on non-object in entity_label when $entity is NULL. Patched against latest dev version.
Comment #7
magicmyth commentedPatch #6 works for me against 7.x-1.5 and solves the problem I was having with Mailchimp module. Holding of on RTBC this until I've tested a bit more but looking good so far.
Comment #8
entendu commented#6 works for me and solves a problem with importing Workflows. Commit ASAP IMO.
Comment #9
magicmyth commentedNothing has gone boom after over a week so RTBC.
Comment #10
basvredelingAgreed, patch in #6 is fine
Comment #11
kristiaanvandeneyndeAlthough this issue should be resolved asap, the patch in #6 is broken. By removing the check for an entity, you're just moving the WSOD further down the line, check entity_extract_ids():
Attached is a different approach.
Comment #12
phenaproximaThe patch in #11 fixes this bug for me, as it occurs in the CER module: #2341403: WSOD at admin/config/content/cer/import. Marking RTBC.
Comment #13
basvredeling#11 looks good
Comment #14
fagoThis now calls entity_ui_get_action_title() with other than the support opersations, thus is bogus.
I'd suggest keeping the old flow instead but falling back to another label if no $entity is given, e.g. the entity type label.
Comment #15
kristiaanvandeneyndeI'm not sure...
How does it call that entity_ui_get_action_title() with any $op except 'add' and 'import'? Any other operation requires an entity ('edit', 'clone', 'delete', 'revert', 'view', 'export') and would thus get caught in the switch.
The only ones that should fall through are the ones that generally don't need an entity at all: 'add', 'import' and any other unsupported operator that someone should manually pass on, which would break anyway.
Comment #16
fagoNot any more if the entity is NULL. The documentation says I can call it without entity in all cases, thus it should work in all of those cases. I'd suggest generating $label as the entity type label if no entity is passed and keeping the existing flow of things.
Comment #17
kristiaanvandeneyndeOkay, I'll try to update the patch when I can (currently at Drupalcon).
Comment #18
ofry commentedThere is my patch with generating $label as entity type label if $entity = NULL.
Comment #20
phenaproxima@ofry, it looks like that patch had bad header information (it contained the full path to your clone of Entity API, starting with "C:/"), so the testbot couldn't handle it. I have re-rolled the patch and attached it.
Comment #21
kristiaanvandeneyndeThe patch in #18 (copied in #20) contains several flaws:
Comment #22
phenaproximaHere's a streamlined and modified version of @ofry's patch, addressing the issues you mentioned. Even the whitespace. ;)
Comment #23
phenaproximaNah, screw that, here's a better one.
Comment #24
phenaproximaHiding broken patches in issue summary.
Comment #25
kristiaanvandeneyndeIsn't this much cleaner?
It takes a small hit on extracting the bundle whether you need it or not, but has all the checks at the top.
Comment #26
kristiaanvandeneynde#23 looks clean too, so I'm even.
Comment #27
phenaproximaI like your version better. #25 looks great to me.
Comment #28
kristiaanvandeneyndeGreat, back to fago then :)
Comment #29
fagoThanks, committed.