Updating
An unrecoverable error has occurred. You can find the error message below. It is advised to copy it to the clipboard for reference.
Please continue to the error page
An error occurred. http://uits.margrit.webdev.uits.arizona.edu/update.php?id=13&op=do
Fatal error: Call to undefined function content_field_tablename() in /home/memcinto/sites/uits/sites/all/modules/cck/modules/userreference/userreference.install on line 127
This was in my testing sandbox. I had already installed the new version of Views (6.x-2.7). I disabled everything in Date and CCK, updated CCK, and ran update. Got the above error. Backed out to 6.x-2.5, now all is well. Tried updating to 6.x-2.6 again, got same error. Backed out again.
Comment | File | Size | Author |
---|---|---|---|
#38 | 625768-userreference_update.patch | 620 bytes | Crell |
Comments
Comment #1
Sc0tt CreditAttribution: Sc0tt commentedSame here.
Comment #2
markus_petrux CreditAttribution: markus_petrux commentedUgh! I wonder how is it possible it went undetected until now. This is my bad as I forgot to load content module in the hook_update_N() implementation. Apologies for the headache.
It can be fixed by adding the following on top of in userreference.install:
Comment #3
markus_petrux CreditAttribution: markus_petrux commentedCommitted to CVS.
http://drupal.org/cvs?commit=285396 (CCK2)
http://drupal.org/cvs?commit=285398 (CCK3)
Comment #4
joshuautley CreditAttribution: joshuautley commentedFatal error: Call to undefined function content_cache_tablename() in /home/{my_site}/public_html/sites/all/modules/cck/modules/fieldgroup/fieldgroup.module on line 225
Little help?
Comment #5
markus_petrux CreditAttribution: markus_petrux commented@joshuautley: Yours is a completely different issue.
1) content_cache_tablename() is implemented by content module.
2) fieldgroup module requires content module, so it seems that you have fieldgroup module enabled but content module is not for some reason.
Make sure you have all the files of the CCK package in the correct place. Also, check if you have more instances of CCK in other directories such as sites/domain/modules, site/all/modules, etc.
In any case, if you need to follow up on your problem, then please open a separate issue. Thanks.
Comment #6
joshuautley CreditAttribution: joshuautley commentedOk, thank you.
Comment #7
osherl CreditAttribution: osherl commentedI have just upgraded to 2.6 and all the data in the CCK part of the node has been deleted. I am trying to figure out what happened... I use Faceted Search with CCK Facets... I will let you know.
Comment #8
NikLP CreditAttribution: NikLP commentedEnlighten me here - are we still saying that the data will be corrupted on the latest release? This should be grounds for a new release surely?
If I've updated to 2.6 without doing this patch, how can I test if I'm a victim of the corruption?
Comment #9
wickwood CreditAttribution: wickwood commentedPatch in #2 worked for me.
Comment #10
markus_petrux CreditAttribution: markus_petrux commented@osherl: I think your problem is not related to this issue.
@NikLP: This patch fixes an issue in the latest update step in userreference module. This update is aimed to fix userreference field settings. It does not alter user data, only the definitions of the field. This bug was introduced when trying to fix another issue: #416134: Userreference, impossible to filter allowed values by blocked users.
Comment #11
NikLP CreditAttribution: NikLP commentedSo we still need to apply it, or it's been re-rolled, or...?
Comment #12
markus_petrux CreditAttribution: markus_petrux commentedThat patch has been committed to CVS, and it should be safe to apply (see the patch HERE, it's just one line). It simply loads content.module during the update step so that the function content_field_tablename() can be found. Otherwise an error will be reported.
Comment #13
NikLP CreditAttribution: NikLP commentedWell I edited the file, re-ran the update but it said no query, so I'm *guessing* that's ok - the initial update was performed with drush, but I get so much chaff output from that in my environment I couldn't even tell you if I got the initial error or not - I didn't on the re-run in any case.
If there's anything else we should know.... :)
Comment #14
markus_petrux CreditAttribution: markus_petrux commentedYou should be able to re-run the latest update step in userreference module.
To proceed, visit update.php, and follow all recommendations (backups, put the site in maintenance mode, etc.), then click Continue and find the selector for userreference module. Even it the system tells you there's no update available, you can still select the update option 6002, and then submit.
This update step walks the list of all userreference fields in your system and updates the structure of the global settings of the field to fix an error that was present before. You could fix this using the automatic process implemented in the update step, or you can edit the settings of all your userreference fields manually, review the "User status that can be referenced" option to make sure it is defined as you really need, and then save the field settings form.
That's all there is in this update step. It does not affect user data, only field settings about something that was buggy before.
Comment #15
Anne-Pierre CreditAttribution: Anne-Pierre commentedthanks markus_petrus, this seems to have done the trick for me.
Comment #16
castawaybcn CreditAttribution: castawaybcn commentedmarkus_petrux, I tried following your instructions but:
a) the patch seemed to be already applied in the latest version
b) there was no entry for userreference in the update page (and I looked thoroughly)
everything seems fine though, I got no errors at all
Comment #17
superflyman CreditAttribution: superflyman commented@markus_petrux
So, essentially, all we need to do is add:
+ drupal_load('module', 'content');
to the appropriate line in userreference.install and it should be all good to run update 6002?
I just wanted to be sure that there wasn't a larger patch or something else that needs to be done. Thanks and sorry for my confusion.
Comment #18
markus_petrux CreditAttribution: markus_petrux commentedYes, that's what the patch does to prevent this problem in the future.
Comment #19
W.M. CreditAttribution: W.M. commentedSO the patch that can be found now on module download page needs to be applied to the latest release "CCK 6.x-2.6" before running update.php?!
Comment #20
micksatana CreditAttribution: micksatana commentedI'm a newbie in Drupal and also never do module patching and updating stuff before..
I just updated views 6007 and userreference 6002 at the same time without running the patch, but no error occurs at all. is it okay?, or it might have hidden malfunction somewhere?
Comment #21
Standart CreditAttribution: Standart commentedSo you're saying the officially stable version 2.6 needs patching but there's no new release?
Comment #22
NikLP CreditAttribution: NikLP commentedI did say...! This is something that should be made into a new release. You can't have a proper release with a known bug like this is in it, it's madness!
Comment #23
chriscohen CreditAttribution: chriscohen commented+1 to NikLP in #22. That is madness. A new release should be issued. I don't know how this can be marked as 'fixed'! I just downloaded 6.x-2.6 and still needed to apply the patch.
Comment #24
DamienMcKennaAnother vote for a quick-fix release.
Comment #25
W.M. CreditAttribution: W.M. commentedNew release please!
Comment #26
jimdemon CreditAttribution: jimdemon commentedI received the same error after adding the patch and rerunning update.php except it shows in line 129 instead of 127 now.
An error occurred. http://localhost:8888/drupal/update.php?id=19&op=do
Fatal error: Call to undefined function content_field_tablename() in /Applications/MAMP/htdocs/drupal/sites/all/modules/cck/modules/userreference/userreference.install on line 129
Comment #27
jimdemon CreditAttribution: jimdemon commentedNevermind, entered a typo when applying the patch. Disregard #26.
Comment #28
HS CreditAttribution: HS commented+1
Comment #29
Iritscen CreditAttribution: Iritscen commentedI know I'm coming in late here, but yeah, this should have been grounds for a re-release of the module.
Comment #30
haeger CreditAttribution: haeger commentedYou think you're late? I waited with updating this since I didn't want any problems when upgrading, hoping that others would find issues and fix them before I started my upgrade. It's said in the module page that the patch isn't needed but I have the same issue as you guys.
Comment #31
haeger CreditAttribution: haeger commentedHi again.
Forgot to say that the patch worked as it should and now I have no issues with CCK.
I still think that the version that's availible for general consumption shouldn't have a known bug in it that requires manual patching, but a solution exists so I'm happy. :-)
Comment #33
misanthropisht CreditAttribution: misanthropisht commentedGreat thanks.
I wish the release notes had mentioned this because I haven't the faintest clue about applying patches in Drupal and I am sure I can't be alone in this.
Simplified fix instructions:
Open userreference.install and replace
With
It's utter madness that this hasn't been packaged into a new release.
Comment #34
HS CreditAttribution: HS commentedI agree! In my case don't want to go through process of patching it. I've never tried it and don't want to screw things up on a live site either.
Utter madness all right!
Comment #35
HS CreditAttribution: HS commentedComment #36
markus_petrux CreditAttribution: markus_petrux commentedThis is fixed in CVS. Applying the patch means all you need to do is add one line of code manually.
If you do not want to patch, oh well... you can install the 6.x-2.x-dev release.
A new release will be created as soon as possible, but that depends on something we are coordinating internally and it has not been faster because we are all busy.
Comment #37
Crell CreditAttribution: Crell commentedmarkus, if you're not going to roll a new release immediately please at least provide a patch file rather than manual instructions on how to change the code. That is not a patch.
Although it's now been a month, so I think a new release is appropriate to consider.
Comment #38
Crell CreditAttribution: Crell commentedHere's what I think is a proper patch file for this fix.
Comment #39
Anonymous (not verified) CreditAttribution: Anonymous commentedAs you can see by the date of this post this patch ( in post #33) still needed to be added to the userreference.install file as I was getting the same errors as the users above.
I'm disappointed that this module has not been updated with this patch, I just wasted one hour troubleshooting this. Let's hope the developer makes the changes asap so we can get on with development etc.
Comment #40
Encarte CreditAttribution: Encarte commentedsubscribe
Comment #41
ajayg CreditAttribution: ajayg commentedI have tried the patch and it seems to be working fine.
Comment #42
Crell CreditAttribution: Crell commentedThe patch was already committed. The maintainer just needs to roll a 2.7 release with it to fix this issue.
Comment #43
KarenS CreditAttribution: KarenS commentedFixed in cvs and a new release is coming, so closing this issue.