Posted by besjon on April 23, 2009 at 2:00am
Jump to:
| Project: | Web File Manager |
| Version: | 6.x-2.12 |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Is it possible to change where WebFM shows up when creating a new node? Right now it seems to be hard coded above the Body when editing a node and beneath the Body when viewing. Is there a way to make it show up in the Manage Fields tab when editing the node content type so that it can be sorted/repositioned?
Comments
#1
I don't know what the "Manage Fields tab" is.
#2
"Manage Fields tab" is a CCK tab of the content type, where you can sort order all fields. Most modules plugin to this, but WebFM does not show up. Meaning we cant change the sort order.
#3
WebFM may not be showing up for @morningtime because the feature is not enabled on the node type edit form.
However, I am seeing an additional problem. I have WebFM enabled on the node type and I can arrange the order on the manage fields form for the node type, HOWEVER, the WebFM feature we not reorder when I am creating the node. Instead WebFM only and always displays at the top of some of my node type. However, it does reorder properly on other nodes.
Hmmm any clues?
#4
I can't reproduce this with a quick test... but I may not have found the right conditions.
What version of CCK are you using? I saw some issues in the CCK project from last summer about content_extra_weight problems. These are supposed to be fixed in the newer version of CCK.
You seem to indicate it only fails on some node types. Are these created via modules? It might be a module execution order thing.
I'm not up on all the "magic" CCK does to re-order things. But it MIGHT be an issue with webfm's form_alter hook implementation. The CCK docs I found were unclear about exactly where you had to use content_extra_field_weight() calls. Most of the docs/examples just used it in the nodeapi hook... but I did see some indication that it should be used in form_alter as well...
But if it was needed there, why does moving the columns around in forms in my test case? There is some magic happening that I don't yet understand.
#5
ok here is more info
using drupal 6.16 with webfm-6.x-2.12
when managing field on the node type I can move WebFM up and down the list and save the changes
when creating or editing nodes the location of the WebFM is arbitary for all node types. in some cases the location is acceptable, however, recently I created some new nodes types with WebFM fields and it put them at the top of the create/edit node form and when I tried to move it I could not.
Good news however, on the view of the node the WebFm file field is just where I told it to be.
So it appears that WebFM is not talking properly to the node edit and create forms about its location on the form.
#6
Here's a quick and dirty / not tested change that might fix this:
In the webfm.module file, find the webfm_form_alter function (about line 455).
In that function, find the code section that looks like this (about line 491):
// Attachments fieldset$form['webfm-attach']['#theme'] = 'webfm_upload_form';
$form['webfm-attach']['attach'] = array(
Change this by adding a single line to that section so that it looks like:
// Attachments fieldset$form['webfm-attach']['#theme'] = 'webfm_upload_form';
$form['webfm-attach']['#weight'] = module_exists('content') ? content_extra_field_weight($node->type, 'webfm_attachments') : 10;
$form['webfm-attach']['attach'] = array(
This should use the CCK weight setting on node add/edit pages.
#7
Thanks.
I installed the one line patch above and it works on all my node types.
I am able to specify the location of WebFM on the node view, create, and edit.
Greatly appreciated.
#8
All of you: Thank you for reporting this and helping to make webfm better.
It will be fixed in the next version.
#9
Automatically closed -- issue fixed for 2 weeks with no activity.
#10
I just installed WebFM and had to install the patch. When is the new version coming out?