Closed (fixed)
Project:
Nodereference Explorer
Version:
6.x-1.1-rc1
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
27 Jun 2009 at 15:03 UTC
Updated:
12 Apr 2010 at 17:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
meba commentedFurther investigation led me to:
in get_item of views class.
From there, I have determined that the problem is caused by "Show preview" setting - if set, this problem occurs.
Comment #2
beauz commentedHas anyone managed to fix this?
Comment #3
agentrickardNo. I managed to confirm it. The problem is with the View generated by the nodereference module itself. It looks like the CSS and JS files are being loaded in a different order, which may be causing the problem.
It may also be better to simply load the data from a View provided by this module, rather than relying on the nodereference. There is also a bug in how the nodereference data is gathered, there is no reaqson to grab 100 items here since we know the NID.
Comment #4
agentrickardAs far as I can tell, it only affects fields that are themselves contained in a Fieldset.
Comment #5
gnindl commentedPreview is now loaded via JSON avoiding the Views CSS and JS loading. JavaScript behaviors are attached after loading. This ensures that you can still use lightbox or thickbox popups for images.
Comment #6
agentrickardCan you post a patch file? I _just_ finished working a patch based on using your own View for the Preview, rather than relying on nodereference to generate it.
I would also argue that using your own Preview view here makes a lot more sense.
Comment #7
gnindl commentedNice patch but I would prefer to load a display from the referenced view. The preview display is then not rendered in the dialog.
Check out the current development snapshot and look at nodereference_explorer_widget_preview(), explorer.preview.js and nodereference_explorer_preview(). You should be allowed to customize the preview as you like.
The list of available preview displays is updated via JSON in the widget settings.
Comment #8
agentrickardWill do. I thought I turned the block off in the dialog, see the line:
I should note, too, that this module is awesome. I was about to scope something just like it when I found this during a search.
Comment #9
agentrickardNice.
I edited line 65 of nodereference_explorer.widget.settings.inc to remove a formsAPI error message:
This used to be set to NULL.
Hm. That is a nasty little FormsAPI bug. It looks like we need to set the #options to array() in the form definition, and magically JS it to NULL to prevent validation errors?
Comment #10
agentrickardHitting the 'browse' button now affects the CSS for the page, altering the font, as shown below.
Comment #11
gnindl commentedCannot exactly reproduce this problem but I think that it is related to this issue:
http://drupal.org/node/545354
http://drupal.org/node/545358
http://drupal.org/node/534426
CSS is now loaded on demand, i. e. when pressing the browse buttons. May preloading CSS with the node form would fix the problem.
There's an other issue with the form validation hidden here. I move the focus for this issue there.
Comment #12
gnindl commentedStatus change, patches welcome
Comment #13
p_alexander commentedI may be looking into this more in the near future. As an additional data point, I get the error (warning: invalid argument supplied...) on the CCK field setup page (i.e. /admin/content/node-type/custom-content-type/fields/field_custom_field). This happens with or without the preview option enabled, so it may not be related. Disabling Nodereference Explorer causes the error to disappear.
And, echoing agentrickard, this module is awesome. Thanks!
Comment #14
andyf commentedAnd again! Awesome module, and as with p_alexander I consistently get that message on the CCK field setup page.
Comment #15
andyf commentedSorry if I'm repeating anything here, I don't know anything about how Drupal works... It seems that I'm having the problem referred to in #9 -
form_select_optionsis freaking out because$element['#options']is NULL, which as agentrickard says is set in nodereference_explorer.widget.settings.inc. I don't understand why it needs to be at one point an array and another NULL, but I'll leave that to you guys! My question: I notice the priority is set to minor - can I confirm that this is unlikely to cause problems with a site?Thanks,
Andy
Comment #16
agentrickardIt's minor and doesn't affect functionality.
Comment #17
andyf commentedThanks, great to hear!
Andy
Comment #18
gnindl commentedThe view displays which are available as preview displays options depend on the selection of the dialog view (content types or advanced view) in the field's widget settings. Those choices are updated via JSON on view selection. This interactivity is not understood by the Form API, as it has to know the allowed options in advance. An approach is to exclude the preview display form element from form validation (included in the current development snapshot):
Comment #19
jasonawantError message does not appear on the /admin/content/node-type/custom-content-type/fields/field_custom_field page.
Comment #20
gnindl commentedFix included in the release candidate