On the newest development version of CCK I am unable to either create new fields it gives me an invalid widget message. The big thing though is how do I add an existing field to a new content type I have created since it is requiring me to create a new field every time I try to add an existing field to the new view. What I think its doing.
Existing field I pull the field up a date field it then automatically adds the widget to the new field widget box. This then forces it to require me to enter a new field to save the new field has an incorrect widget of course and the event can't save. Anyway I cant add existing fields or new fields in the newest development version it worked before it had all the pretty drop and slide stuff.
thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #47 | content.js_.patch | 1.39 KB | karens |
| #30 | 01.jpg | 7.58 KB | claudiu.cristea |
| #30 | 02.jpg | 20.77 KB | claudiu.cristea |
| #29 | 01.jpg | 8.45 KB | claudiu.cristea |
| #29 | 02.jpg | 43.75 KB | claudiu.cristea |
Comments
Comment #1
yched commentedI'm sorry but I cannot understand your post, you're not being clear
Please provide a clear description of
- exact actions you are doing
- what you expect
- what happens instead
+ this looks more like a feature request to me, we'll turn that back into a bug if it appears there is one.
Comment #2
ctmiller commentedLets see if I can make this more clear.
I am trying to add an existing field to a new content type.
1) Pick the field set it up. When I set that field up. It populates the widget field for the new field section with the widget types for the existing field. There is no option to leave the widget field blank. Therefore when I try to add the existing field it gives me the error that the new field section is not filled out correctly.
I worked around it by setting a second date field up as a new field as dummy field. I then was able to save the existing field to the new content type.
I then went and deleted the new field as I did not need the new field ( I just needed to add an existing field).
I hope this is much clearer than the previous post. I do think it is probably a bug not a feature.
Notes:
The widget for new field automatically sets to whatever the widget type is of the existing field type whichI try to add.
Comment #3
yched commented1) Pick the field set it up. When I set that field up. It populates the widget field for the new field section with the widget types for the existing field. There is no option to leave the widget field blank. Therefore when I try to add the existing field it gives me the error that the new field section is not filled out correctly.
Sorry, this still doesn't make any sense to me. English language issue, I think + you are still being vague.
Say where you click, what you choose and where, what *exact* error message you get.
edit : not a language problem, you're in the States. You need to make a minimal effort and post clear reports. That's the minimal job you can do if you want to get help.
Comment #4
ctmiller commented1) Go to administer
2) Click on content types
3) go to my content type I have set up for this example events_non_church_related
4) click on manage fields
5) go to the add fields section
6) pick an existing field to use(doesn't matter kind or type)
7) when this existing field is picked the options tab above for new fields picks up values in the drop down list. It doesn't matter what field type is selected in the existing field box, the options for the field type selected are shown in the operations box for the new field box.
8) The options box drop down list for the new field now has values.
9) There is no option to move the new operations drop down list it back to its blank state now that an existing field is selected.
10) I am now required to input a new cck field of the same type I am trying to share.
This is because the new field brings up a message requiring that the name and field of the new field section be completed in order to add the existing field type to the desired content node.
Sorry I ticked you off thought I was being clearer than I was.
Comment #5
karens commentedIf you have a field selected, you must also have a widget selected. If you de-select a field and go back to no field, the widget selection will also go back to none selected. That all works exactly as expected.
Why would you want to be able to have a field selected without a widget? You can't do anything with it anyway. You certainly can't save it that way.
Double check the very latest -dev code to see if you still have a problem there, I can share fields with no problem at all and everything behaves as it should.
Comment #6
ctmiller commentedI am using the latest nightly build.
I don't want to use a field without a widget that is not the issue at all.
The issue as I've explained above is that I can't share fields without the workaround that I did above.
This is because, when I select an existing field to share with the content type it is prepopulating the operations or widget selection of the new field section with the widget types for the existing field that I am adding.
With that box populated, I am then forced to create a new field to share the existing field.
There is no selection in the pop down list for none selected. Once I have selected a field to share the only options in the new field operations drop down are for the widget types for whatever existing field is added. Change the existing field to another one and poof the widget types in the operations for the new field magically change to the list of widgets types for new field you are trying to share.
As suggested, I am on the latest build. I have cleared caches, I have run update.php. I have tried physically deleting the module then reinstalling it thinking the files might have changed when the new fancy interface was added, all to no avail.
And to confuse things further the same thing happens if you try to add a new field the operations widget for the existing field type gets populated with the widget types for the new field being created.
I know that the module maybe working perfectly for you. Been there seen it many times in doing development work. If you need to see what its doing live let me know and I can let you in the website to see whats going on.
Comment #7
karens commentedNothing like this is happening on an installation with just core CCK fields, I suspect you have some other module interfering somehow, either a contrib CCK field that isn't working right in the new UI or a non-CCK module that has javascript that is getting in the way. What other modules do you have enabled, including CCK contrib modules? What kind of field is the shared field that's creating problems? Do you have the very latest -dev version of all CCK modules?
Comment #8
ctmiller commentedLike I said the problem doesn't seem to rely on any certain field even the core ones seem to cause the issue.
The only add on modules that I am using are fckeditor(disabled for these content types),views,date calendar,pathauto, and img assist all of which are the latest nightly build.
I tried to see if one of the add ons might be causing it be switching everything off but core modules.
I have a test server at the house, with the same configuration as my production server. I will install drupal and cck by itself on a pure drupal 6.4 and see if I still have the issue. If its a module interfering with it I should be able to add them back one at a time till something cracks it.
Comment #9
bizarrogir commentedI also have this same problem. I installed the newest CCK build today. When I built the fields for my first content type everything worked correctly. The problem occurs when you attempt to build fields for the second content type and you already have existing fields from first content type.
When you pick the "type of data to store" in the new field, the last box changes to "Select List" and gives you the field options as it should. However, the last box in the existing field portion also changes to "Select List" when it should remain as "Select widget" so that drupal doesnt think youre trying to add an existing field at the same time.
So changing the data type changes the widget box for both the new and existing fields. The last box for both the new field and old field are somehow linked.
Modules other than core that I have enabled: CCK, Views, Pathauto, FCKeditor, Image, and Date
Comment #10
bizarrogir commentedI also tried disabling all modules except the "Core-required", and the Content and Text modules in CCK (turned all others in CCK off). The problem still occurs.
Comment #11
vasheck commentedafter installing cck-6.x-2.0-rc8 I can't add a new field to my existing content types:
this is a description of what I do/did:
1) admin > content management > content type > add content type
2) i fill out the fields necessary
name: test_cck
type: test_cck
save content type
3) after saving I get redirected to: mysite.com/admin/content/types
- click on 'Manage fields' of my newly created "test_cck" content type
- I get redirected to: mysite.com/admin/content/node-type/test-cck/fields
I fill out the necessary fields for the new field
New filed: new_field
field_: new_field
select a field type: text
form element: textfield
save
save field settings
so far so good...
!!! now this is the part when my troubles start
4) I go back to the list of my content types: mysite.com/admin/content/types
I select "add content type"
5) i fill out the fields necessary to create a new content type
name: test2_cck
type: test2_cck
save content type
6) now i'm back on the page that lists all my content types: mysite.com/admin/content/types
I select 'manage fields' of my newly created "test2_cck" content type
7) now... under "Add" ... I see three rows with blank fields:
New field
Existing field
New group
I'm not interested in using an existing field (e.g. new_field that I created under test_cck content type).
I want a brand new field.
8) i fill out the necessary field in the "New field" row:
label: test2_field
field_:test2_field
select a field type: text
form element: textfield
9) I click "save"
now I get the following message:
* Add existing field: you need to provide a label.
* Add existing field: you need to select a field.
(In the "Existing field" row... the fields "label" and "select an existing field" are highlighted in red)
I can't get rid of the message and I don't know how to add a brand new field.
I know this is not a conflict with other modules since I'm using a fresh install of drupal 6.4 in my local environment (xampp) and I only use the core modules now (no additional modules are installed).
I hope I was clear to describe my problem. (a screen shot provided)
Thank you in advanced for any help with this issue.
Comment #12
karens commentedI can't replicate this problem at all. I can add new content types and add fields to them with no trouble at all.
I can't think of any reason why you would have this problem if you don't have any other modules enabled (which would have been my first question).
I'll leave this open in case anyone else is having this problem and can provide more ideas.
The only other thing I can think of is to try a different browser just in case it's some kind of javascript issue.
Comment #13
doublejosh commentedDropped in the RC8 today.
Problems with adding a new field OR an existing field.
The issue is that when you select from the first select list under the heading "type" it dynamically effects both select lists for new AND existing fields.
BIG FAT BUG :)
Comment #14
vasheck commentedI just noticed that I can add a new field but only in case I add an existing field as well.
I hope this info will be helpful. I've attached another screen shot of more or less the same thing.
But I swear, I'm not making this stuff up.
Thanks in advance for any feedback or help.
Comment #15
yched commentedDefinitely looks like a JS issue: Looks like the jquery selector that is supposed to select the relevant "widget" dropdown selector for either "add new field" or "add existing field" in fact selects both of them...
Something around :
in content.js (2 occurrences, one for each "add [new|existing] field" row)
I'm not currently where I can test or debug this, but I know for sure that I was not seeing this on my setup, and Karen doesn't either.
Could you guys specify which browser / OS you're using ?
Comment #16
webwriter commentedSame problem. The form expects you to add both an existing field AND a new field and won't allow you to add an existing field without also filling in new field info as well.
This is a huge bug.
I'm using Ubuntu Hardy Heron/Firefox.
Comment #17
webwriter commentedJust tested in IE7. Same issue- refuses to accept only one entry- expects to have both a new field and an existing field or returns an error.
Comment #18
vasheck commentedI'm using vista home premium...
I've tested the issue in the following browsers:
Firefox 3.0.3
Safari 3.1.2 (525.21)
Explorer: 7.0.6001
The problem persists in all of them.
Thanks very much for your help.
Comment #19
jvieille commentedSame problem
XP + IE7
Impossible to create a field, this requires to also add an existing field
The widget selection for the form element of the 2 (new+ existing) fields combines both offering for the different data types that need to be selected.
For example, selecting a node reference for the new and a text element for the other gives the same -inconsistent - merged choice:
Select list, Check boxes, Single On/Off checkbox, text field, Text area
Looks like a cat walked on a developer's keyboard
Comment #20
junro commentedSame problem :(
Comment #21
karens commentedI cannot replicate the problem using IE XP with either FF3 or IE7, both work just fine for me.
I haven't got a clue what to try, and since I can't replicate the problem, I can't test any possible fixes. And I don't know enough javascript to have any idea what to try anyway.
Yched, if you have any ideas that people experiencing this could test, I guess that's the only way to figure this out.
Comment #22
cougar88 commentedSame problem here. I just installed the latest CCK and View today.
When I hit save, it won't allow me add a new field to an existing content type. instead it requires me do something on existing field which doesn't make any sense.
I am using vista basic+firefox, but I believe it's irrelevant to the problem.
Thanks for sharing...
Comment #23
joemaine commentedthis is a serious issue with RC8 - I had to roll back to RC7 and now the issue is gone.
Comment #24
ar-jan commentedStrange, I have just upgraded to RC8, and withouth any errors I can:
- add just a new field to an existing content type;
- add an existing field to an existing content type.
(using Ubuntu, FF 3.03)
Comment #25
yched commentedPeople experiencing this could try the following
- make sure you use Firefox with firebug
- edit content.js as specified below:
Then, reload the 'admin field' page (CTRL-F5, to be sure to grab the updated JS file), check the Firebug console, and report the results here. The normal behavior would be :
new field - target: (a reference to the widget selector for the 'add new field' row)
existing field - target: (a reference to the widget selector for the 'add existing field' row)
People seeing the bug will probably get different results, which I'd be interested to know...
[edit : fixed the code as mentioned by claudiu.cristea in #29]
Comment #26
aterchin commentedsame problem. trying to add an existing field results in the errors in pink, because it also tries to add a new field.
tried the above code in #25, it worked, however, all the widget form elements come up (text, image, amazon, emfield....) regardless of what's in the field (add or select) box.
using firefox 3
Comment #27
karens commentedThe point of the code in #25 is not to fix the problem but to debug it. Yched is asking someone to use firebug along with that code and report back what the firebug messages say.
Comment #28
claudiu.cristeaSame behavior... but is gone after trying #25... Seems that Ctrl+F5 fixed the issue... :) The old content.js was in the browser cache.
Comment #29
claudiu.cristeaIs not gone... Sorry for the false info... In fact, the was not fired up because the code provided at #25 has a small syntax error. A quote (') was misses in the second console.log().
I tried #25 and I got in firebug:
See first attachment.
Click on Object length=5 it take me to the DOM tab. See 2nd attachment.
Comment #30
claudiu.cristeaNew infos... With the same platform (OS/browser - Win/Firefox 3.0.3) I tested CCK 6.x-2.0-rc8 on other site. There is working well. Weird, no?
For this reason I think that this is NOT a cross-browser issue. Results from firebug on a "RC8 working site"
See screenshot #1
And to the DOM tab we have only a '0' object as in attachment #2....
Comment #31
yched commented@claudiu.cristea : thanks for the info.
I'd like to take a look at your 'broken' site, if it's online somewhere.
Can you create an account with 'administer content' and 'administer site configuration' permissions and send me the url and credentials through my contact form ?
Note : same request for anyone seeing this bug on a site accessible online, in case claudiu.cristea's site is only local. Just be sure to modify content.js as specified in #25 so that I can have some debug information.
Comment #32
karens commented@yched, what is the reason for the difference between:
and
I see you have different class names for the field selectors but use the same class name for the widget selectors, could that be the problem?
Comment #33
karens commentedMore thinking out loud: What will happen if we have a site where some field or widget types are missing due to upgrade problems? Or if the field or widget lists are incomplete because of caching of outdated values?
I'd be interested to know if the people reporting problems have missing field info in their databases. You can scan the tables content_node_field and content_node_field_instance. If you see any items there that are missing module names or are not marked as active, but you are editing a content type that uses those fields, that could be a factor.
Also, be sure to clear cache_content() to be sure the field and widget type lists are updated.
And try using the Manage fields screen on different content types, including content types that don't have any fields, to see if that has any affect.
Comment #34
jvieille commentedSame behaviour trying to add a field to any content type, even then no existing custom fields are there.
As soon as I select the type of data, the "Select a widget" empty combo lists of both New and Existing form zones fill up with all available widgets, defaulting to the first item "Select list "
This definitely has something to do with the rc8 release, everything was fine before
Comment #35
add1sun commentedI'm having the same problem as claudiu.cristea on FF3/Mac and Safari/Mac with the same result with the debug code
I'm only working locally and about to head out the door so I can't set up a public site right now. Maybe later tonight.
Comment #36
karens commentedEr, yes, the rc8 release is when this new UI was added. Earlier releases had the old 'Manage Fields' screen. This issue is all about getting the new UI to work correctly in all situations.
Comment #37
Poieo commentedyched & KarenS,
I've sent you both private messages with info on a live site with a user name and password.
I'm having the same issue everything is talking about. Hope this helps!
Comment #38
Poieo commentedKaren,
I have tried all three of your suggestions in #33 and they had no affect on the issue.
Please let me know if there is anything else I can try to help the process along.
Comment #39
johnthomas00 commentedI have this problem too.
When I select the "Type of Data to Store" the "Form Element to Edit This Field" changes for both the "New Field" that I am trying to create and the "Existing Field" that I do not touch, care about, and seems to be causing the error, "* Add existing field: you need to provide a label.
* Add existing field: you need to select a field."
Comment #40
Brian294 commentedHi everyone,
I encountered the identical issue as described above. I noticed that when I selected an item from the "Type of data to store" list, it modified both of the widgets lists for both the New and Existing field lines. Clearly, the event should only be modifying the widget list in its current line.
It also appears to be a theme-related issue. I encountered the issue using the "Pushbutton" theme. I know Garland is pretty safe for the admin section, so I switched it to Garland... and the issue went away! To troubleshoot, I tested the themes that come out of the box with Drupal 6.4 and this bug also appears to affect Marvin, Chameleon, and Bluemarine. It does not affect Minnelli and Garland.
I spend about 20 minutes looking into what theme-related element might be causing the problem, but I have to admit, I am not a guru with Drupal themes. Perhaps someone else can pick up the ball from here. :-) Hopefully my contribution at least gives people a decent workaround (use Garland or Minnelli) and it gives the module developer a sure-fire way to reproduce (use Pushbutton, Marvin, Chameleon, or Bluemarine).
Brian
Comment #41
yched commented@Brian294 : thanks for the followup. This is probably a crucial point, but I'm not too sure what this means yet. Investigating on the sample site provided by dheffron.
To all people seeing this bug : switch to garland as an admin theme as a temporary workaround
(admin/settings/admin)
Comment #42
jvieille commentedBingo!
I was using the simplistic Chameleon as the administrative theme.
Using the site theme Garland instead solved the problem
Comment #43
yched commentedOK, found it. Problem is with table-based layouts.
$(this).parents('tr'))also returns the top-level rows from the layout, and breaks the logic.This should be fixed by the following changes in content.js (I'm on holiday and writing this from a cybercafe in Portugal :-p, which makes it uneasy for me to roll a proper patch)
This could probably be refactored / optimized a little, but we can see this later.
Comment #44
yched commentedSide note : I'd welcome if someone could test the above fix in different browsers (FF, IE, Safari, Chrome...). As usual, be sure to refresh browser caches (usually CTRL-F5) after updating content.js
Comment #45
jsbuser commentedMoving from BlueMarine to Garland as admin theme also made the issue go away. - John
Comment #46
karens commentedI switched to Bluemarine and could replicate the problem. I then made this change, used CTL-F5, and it fixed it in Windows XP/FF3. Also tested Windows XP/IE7 and could recreate the bug without the fix and the change fixed it.
I'm leaving this marked CNR so others can confirm that this is working, but it looks good to me.
Great detective work! It never occured to me to try a different theme.
Comment #47
karens commentedHere the change is as a patch. If we get a couple confirmations that it's working, I'll commit it.
Comment #48
Poieo commentedThe patch solved the problem for me.
Thanks for all your hard work!
Comment #49
add1sun commentedConfirming that the patch in #47 fixed the problem in the Wabi theme too. :-) FF3/Mac
Comment #50
karens commentedOK, fix committed to -dev. I'll roll a new rc9 with this change shortly.
Thanks to everyone for getting this resolved!
Comment #51
yched commentedand thanks to ctmiller for insisting in posts #0 to #8 :-)
Comment #52
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.