By allnet000 on
I just received this error message when trying to navigate to my homepage.
Fatal error: Call to undefined function user_access() in /home4/xxx/public_html/xxx/sites/all/modules/lightbox2/lightbox2.module on line 605
In my zeal to improve the page load performance of the site, I download CDN and Pressflow, everything appeared to be fine, but when I clicked on the Home icon I got this error message.
How do I fix this and get my site back?
Comments
I had the same problem.
I had the same problem. Turned out for me, I had accidentally moved my Modules folder (the core modules, which should be in a completely separate folder from the modules you've installed on your own) while in FTP mode. There was some core documentation that told me that it is almost always a problem related to the core modules folder. Check the PATH and CONTENTS of the five core drupal modules (system, node, etc) and make sure all are in the right folders.
Basically, Drupal is looking for certain core functions in specific places within its installation, and when it doesn't find them there, it is crying to you, saying, "please help me! I can't do what you're asking me to do without knowing where my core functions are!" BUT YOU KNOW that they are in the modules folder and that you just need to make sure they are where poor old Drupal expects to find them.
Is that helpful?
Marc
^
Make sure that /modules/user/user.module file exists.
What's new and changing in PHP 8.4
Checked both comments
Thank you both. I do have the modules/user/user.module installed. And my core modules are in the right directory. I did notice that I have installed the Lightbox2 module into the same folder instead of using the sites/all/modules directory. I know that is a no no, but is that the cause of my error? Is the solution simply to move the file into the correct folder, or does that cause more harm than good? Thanks.
I would probably back up the
I would probably back up the banged up version first then move the folder. Most likely, it wasn't installed by Drupal in that location and you moved it there by accident. 99% chance that you move it, it helps not hurts things, possibly fixes your site as well.
The Banged Version?
When you say banged version is that of the entire site, the Lightbox module or something else? Thank you, just want to make sure I do it right and not make it worse.
Do you have any existing site backups?
If not, you can never start too soon :)
If you've never done a full-site backup, you should at least do that now. If you have done one recently enough, then you should at least back up the MSQL database. What I also did, when I had this problem, was to back up the entire file structure of my existing Drupal site since I wanted it as a reference in case I made things worse somehow. My site was live and staged, so I just downloaded the entire drupal directory and all its subdirectories to a local folder on my computer (of which I noted the location).
So, take those steps and then try moving the lightbox module. I doubt that moving it is going to make your site worse, so backing up is just a precaution but an important one in case something goes wrong. I doubt you'd need to worry about backing up the lightbox module explicitly since that can probably be re-downloaded from its project page.
Let me know where you stand after you try all of this.
Marc
Did you get this fixed?
What is your progress? I want to help...