With the latest D7 version from cvs I get this error:

Fatal error: Call to undefined function list_field_schema() in \drupal\sites\all\modules\cck\cck.module on line 117 Call Stack: 0.0006 63944 1. .....

Attached patch should fix that.

Comments

dave reid’s picture

StatusFileSize
new2.27 KB

Patch is missing lines at the bottom.

Cheek’s picture

Creating a 'Select List' is still not possible. Using the patch makes it work, but gives these warnings:

WARNING: INCLUDE_ONCE(C:\XAMPP\HTDOCS\MODULES\CCK\CCK.MODULE): FAILED TO OPEN STREAM: PERMISSION DENIED IN DRUPAL_LOAD() (LINE 941 OF C:\XAMPP\HTDOCS\INCLUDES\BOOTSTRAP.INC).
WARNING: INCLUDE_ONCE(): FAILED OPENING 'C:\XAMPP\HTDOCS/MODULES/CCK/CCK.MODULE' FOR INCLUSION (INCLUDE_PATH='.;C:\XAMPP\PHP\PEAR') IN DRUPAL_LOAD() (LINE 941 OF C:\XAMPP\HTDOCS\INCLUDES\BOOTSTRAP.INC).
das-peter’s picture

Hi Cheek,

this issue looks more like a webserver / php config issue.
Line 941 in bootstrap does nothing else than this include_once DRUPAL_ROOT . '/' . $filename; - a simple include of a file.
The Warning says you don't have access permissions to this file.
Check if:

  • permissions are set properly (Not to relevant for you - because you use Windows)
  • php safe mode is enabled.
    • if so, think about to disable it. It's a feature which will be removed in future version of php due of several negative impacts - a server should be configured secure without using "safe mode" ;)
    • if you want to keep "safe mode" enabled, check if the option safe_mode_include_dir is set properly.

Cheers,
Peter

Cheek’s picture

Status: Needs review » Reviewed & tested by the community

Hi peter,

You were right. PHP safe mode wasn't disabled. But by patching the cck.module file, access to cck.module was somehow set to forbidden.. Sorry for the confusion. :)

I don't usually deal with patches, but it seems like this one can be set to 'reviewed & tested by the community' so it can be enrolled?

arthurf’s picture

Patch applies cleanly and I can now create select drop downs. I am seeing a bunch of warnings:

    *  Notice: Undefined index: default_value_function in cck_default_value_form() (line 100 of  sites/all/modules/cck-HEAD/cck.module).
    * Notice: Undefined index: field_name in cck_field_set_setting() (line 237 of  sites/all/modules/cck-HEAD/cck.module).
    * Notice: Undefined index: field_name in cck_field_set_setting() (line 257 of  sites/all/modules/cck-HEAD/cck.module).
    * Notice: Undefined index: default_value_widget in cck_default_value_validate() (line 156 of  sites/all/modules/cck-HEAD/cck.module).
    * Notice: Undefined index: default_value_function in cck_default_value_validate() (line 157 of  sites/all/modules/cck-HEAD/cck.module).
    * Notice: Undefined variable: instance in cck_default_value_validate() (line 165 of  sites/all/modules/cck-HEAD/cck.module).
    * Notice: Undefined variable: langcode in cck_default_value_validate() (line 165 of  sites/all/modules/cck-HEAD/cck.module).
    * Notice: Undefined index: field_name in cck_field_set_setting() (line 237 of  sites/all/modules/cck-HEAD/cck.module).
    * Notice: Undefined index: field_name in cck_field_set_setting() (line 257 of  sites/all/modules/cck-HEAD/cck.module).
criz’s picture

Priority: Normal » Critical

confirmed. selectlists are not usable because of this bug.

Azol’s picture

subscribing

shunting’s picture

subscribing d7b2

Azol’s picture

I confirm that patch in #1 has solved my problem and I now can use select lists and logical values (on/off)

jcarlson34’s picture

I also used patch #1 and am now getting the same warnings as arthurf in #5.

However, select lists are editable now. I upgraded from 6.19 to 7 beta 3 and used content migrate.

ngmaloney’s picture

Experiencing same issue.

1. Installed fresh copy of D7 Beta-3 on MAMP
2. Created a content type with a list field
3. Populated initial field values
4. WSOD

php_error.log:

PHP Fatal error: Call to undefined function list_field_schema() in /drupal-7.0-beta3/sites/all/modules/cck/cck.module on line 117

meba’s picture

Attached patch solved both the undefined function and the notices (since they all come together).

That doesn't change the fact that some of the settings like PHP functions are not saved when CCK is enabled

johnv’s picture

Status: Reviewed & tested by the community » Needs review

Shouldn't this new patch be tested by test-bot?

dave reid’s picture

Only if testing is enabled on the CCK project, and the CCK project has actual simpletests, which does not seem to be the case.

johnv’s picture

Status: Needs review » Needs work

Dave, OK, I understand.
I have tested your patch #12: I created 3 fields: List, List(text) and List(numeric). I could create Content types and Content with no problem, except for one Notice after creating List(text) :
" Notice: Undefined index: default_value_function in cck_default_value_form() (line 100 of cck.module).
Could you remove that last one?

good_man’s picture

The same issue, it's working but leaving a notice as in #15

yechuah’s picture

patch uploaded same as 12 but for version 7.x-2.x-dev.

edit: attachment link doesnt work. try here http://drupal.org/files/cck.patch

good_man’s picture

The patch has an error during upload maybe? it's pointing to http://drupal.org/files/issues/

jbfelix’s picture

dave reid’s picture

Status: Needs work » Reviewed & tested by the community

+1 to #12.

dave reid’s picture

+1 to #12.

yched’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new6.52 KB

Karen fixed the .install file not being loaded a couple days ago.

Committed the attached patch for the other glitches (different from #12, which had a couple isset checks that shouldn't be needed - or at least, if some of those stuff happen not to be set, then the problem lies elsewhere)

paulgodard’s picture

Hi
I am new to Drupal... so I am no so sure if I have done something wrong or not. Anyway I get 2 failed when applying the patch on cck 7.x-2.x-dev.

MacPro:cck paul$ patch -p0 < cck-d7-allowed-default-php-906358.patch
patching file cck.module
Hunk #2 FAILED at 67.
Hunk #3 succeeded at 85 (offset -1 lines).
Hunk #4 succeeded at 93 (offset -1 lines).
Hunk #5 FAILED at 110.
Hunk #6 succeeded at 127 (offset -2 lines).
Hunk #7 succeeded at 152 (offset -2 lines).
Hunk #8 succeeded at 164 (offset -2 lines).
Hunk #9 succeeded at 283 (offset -2 lines).
Hunk #10 succeeded at 329 (offset -2 lines).
Hunk #11 succeeded at 347 (offset -2 lines).
2 out of 11 hunks FAILED -- saving rejects to file cck.module.rej

jcarlson34’s picture

Hi Paul. Looks like yched already committed the patch to the latest dev version of CCK.

So instead of installing the patch, you can just download the latest dev release (currently Jan 10) and the fix will be included.

As for the hunk fails, often times, patches fail when patching a version of the dev that is different from the version the patch is associated with. Hope that helps.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.