H,
I get an WSOD when updating from 6.x-2.x-dev or 6.x-2.15 to 6.x-3.0-rc3. My update procedure:
# rm -r sites/all/modules/views
# drush dl views-6.x-3.0-rc3
WD php: Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'views_access' not found or invalid function name in
_menu_check_access() (line 453 of /var/www/drupal/includes/menu.inc).
Project views (6.x-3.0-rc3) downloaded to /var/www/drupal/sites/all/modules/views.
# drush updatedb
No database updates required
# drush cc (all)
'all' cache was cleared
When update.php is run for the first time, database update 6300 is performed without errors.
Regarding the callback error: This is the second site I have updated to 6.x-3.0-rc3, and it's the first time I have seen this error, so it's maybe not primarily a Views issue. On this one site, I can reproduce the WSOD.
Regarding the WSOD: After the update, the site is completely blank, including the admin pages. Apache's error.log is swamped with errors like this:
[Fri Nov 18 14:59:55 2011] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Call to undefined function views_cache_get() in /var/www/drupal/sites/all/modules/views/views.module on line 961, referer: http://mydomain.org/mypath
Other fatal errors point to Call to undefined function _views_fetch_plugin_data() in /var/www/drupal/sites/all/modules/views/views.module on line 904
, and Class 'view' not found in /var/www/drupal/sites/all/modules/views/views.module on line 906
.
Downgrading to views-6.x-2.16 plus restarting Apache httpd (!) solves the WSOD for me.
Comments
Comment #1
dawehnerCould it be that you missupload views when you update? This is certainly a problem.
Comment #2
asb CreditAttribution: asb commentedWhat do you mean by "misupload", the wrong location of the Views folder? At least if Drush works as it usually does, and reports back correctly what it is doing, it puts the "views" folder into "sites/all/modules" (as quoted from the shell in my initial issue). Also that's the location which I recursively deleted before downloading views-6.x-3.0-rc3, and before downgrading to views-6.x-2.16 (an error whould have been thrown if the folder to be deleted wouldn't exist).
(Checked) Yes, at the referenced path (
/var/www/drupal/sites/all/modules/views/views.module
), views.module does exist when views-6.x-3.0-rc3 is installed and the mentioned errors are emitted into error.log.I currently do not need to run Views3 in this site, so I'm fine with downgrading again; maybe we should postpone this issue and see if more similar reports come in (in case this is a singular phenomenon on one site)?
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedYou can't do this. By deleting the directory while the module is enabled, you removing all of Views functions even though core is referencing these functions in the menu_router table. drush is still invoking Drupal. Unfortunately, Drupal core is not polite and doesn't check to ensure these functions exist. IMO this is probably a bug in core that it can whitescreen in a situation like this.
You are going to need to download Views manually, now, to replace it.
With drush, there is no need to rm the module when you do a 'drush up'; it will move the old contents to a backup directory and replace them in any case.
Comment #4
asb CreditAttribution: asb commented'drush dl' (pm-download) downloads and extracts a specified release into the given path, by default
./sites/all/modules
. If files/folders exist at this location, they're overwritten. In case directory layout or file naming has changed (not unlikely with a major version update), this results in a mixture of old and new files and causes weird errors. Thus, the recommended procedure is to always delete the old directory, then drush dl the desired release. Drush works, as long as Drupal core can bootstrap successfully. The Core environment can be chaecked with 'drush st' (status); even with a deleted views folder, the Core bootstrap completes fine. The only (and obvious) exception from this recommendation are core upgrades through Drush which work differently.'drush up' (pm-update) updates always to the recommended release for the discovered environment and moves the old files into
/backup
(drush 3.x) or~/drush-backups
(drush 4). According to 'drush rl' (pm-release), the currently tagged as "recommended" release is views-6.x-2.16, so you can't go with 'drush up' to views-6.x-3.0-rc3.The
_menu_check_access()
message at shell level ist not the issue here, it's a side effect that does not show up in Apache's error.log. The issue I've experienced is a WSODafter
a complete views-6.x-3.0-rc3 package has been downloaded and unpacked into./sites/all/modules
. "Prove":When these files are in place, I'm encountering the WSOD, and the quoted error messages (
Call to undefined function views_cache_get()
,Call to undefined function _views_fetch_plugin_data()
,Class 'view' not found...
, etc.) start to show up in Apache's error.log.I double-checked this by downloading views-6.x-3.0-rc3 from the project page, unpacked the archive manually, and got exactly the same behaviour (WSOD...). So deleting the 'Views' directory and then downloading the views-6.x-3.0-rc3 release through drush is definitely not the root cause of the issue here - imho.
However, in my initial report I already mentioned the required "fix" for this issue without recognizing it. The site requires a full Apache httpd restart (
/etc/init.d/apache2 restart
on Debian) before the WSOD goes away (not a graceful apache2 "reload", not clear the Drupal caches!). At least for my site this is required as well after updating to views-6.x-3.0-rc3, as after downgrading to views-6.x-2.16.So I'll try to memorize if a WSOD shows up after a major Views version update: restart Apache httpd!
Comment #5
asb CreditAttribution: asb commentedCorrection: The Apache restart seems just to mask the WSOD for a while. Back to to views-6.x-2.16 again.
Comment #6
merlinofchaos CreditAttribution: merlinofchaos commentedI believe you can specify a version to drush up, i.e: 'drush up views-6.x-3.0-rc3' directly
In any case, the point remains: You can't remove a module without disabling the module because the menu callbacks still exist and Drupal core does not call function_exists(). I would encourage anyone in the know to file a bug (or find an already existing issue and comment) about this against core. It's poor behavior. :)
Comment #7
merlinofchaos CreditAttribution: merlinofchaos commentedLooking specifically at this error:
The code at that line looks like this:
views_include('cache')
includes the file that contains the function that is missing. Therefore, the problem would be that, somehow, views_include('cache') is failing.Someone who is 1) experiencing this and 2) decent with PHP could theoretically debug this further and see if they can figure out why views_include is failing. However, this function has not changed from 2.x to 3.x.
I am now marking this as Needs More Info -- we need some understanding of why views_include is failing to be able to proceed.
Comment #8
ahmedhanyfawzy CreditAttribution: ahmedhanyfawzy commentedthe issue of wrong permission of 6226 is fixed for me when installing the dev version details in this blog post.
Comment #9
asb CreditAttribution: asb commentedMy first attempt to update a Views 2 site directly from views-6.x-2.16 to views-6.x-3.0 leads again to a WSOD on all pages of the site, including admin pages. Apache's error log reports a number of fatal errors:
[Sat Jan 14 18:37:01 2012] [error] [client xxx] PHP Fatal error: require_once(): Failed opening required './sites/all/modules/views/theme/theme.inc' (include_path='sites/all/modules/import_html/coders_php_library:.:/usr/share/php:/usr/share/pear') in /var/www/drupal/sites/all/modules/views/views.module on line 1126
At the path
./sites/all/modules/views/theme/theme.inc
, the file "theme.inc" exists:Also,
/usr/share/php
andsites/all/modules/import_html/*
exist,/usr/share/pear
does not. To my knowledge, I'm not using any PEAR components in my Views or on the site at all.[Sat Jan 14 18:37:13 2012] [error] [client xxx] PHP Fatal error: Call to undefined function views_include() in /var/www/drupal/sites/all/modules/views_attach/views_attach.module on line 188
The file
./sites/all/modules/views_attach/views_attach.module
exists, and the 'views_attach' module is installed and enabled. The code around the reference line 188 in the fatal error is:According to 'drush ws' (= "watchdog show"), there is "only" one potentially relevant warning in Drupal's watchdog log:
All caches have been cleared through 'drush cc'.
Downgrading back to views-6.x-2.16 seems to work fine, "just" Views 3 breaks the site. Any ideas and/or suggetions how to proceed?
Thanks!
Comment #10
asb CreditAttribution: asb commentedRelated issues: #1128028: Call to undefined function views_include() in /all/modules/views_attach/views_attach.module on line 187 and #846122: Fatal error: Call to undefined function views_include() in ..../sites/all/modules/views_attach/ after updating to views 6x.2.11; in the last one, eaton mentioned: "[...] views_include() is a core function of the views module, and if it can't be found, Views itself is not loading correctly." Because of this, eaton closed the 'views_attach' issue. #1128028 was closed because this is supposed not to be a Views issue, so we have a classical deadlock. That's bad since it blocks the migration to Views 3.
I can reproduce the WSODs after updating to Views 3 on several different sites, but I don't have a procedure to reproduce on a fresh site. I suspect that this issue only shows up with real world data; in this case, it might be triggered by the changed pager settings in Views 3 that lead to timeouts. The reason for this suspicion is as follows:
Updating to Views 3 gives me an WSOD, directly after installing the updated views version, running update.php (via drush), clearing the caches (drush cc), and reloading the frontpage. Apache's error.log says:
[Sat Apr 21 20:18:45 2012] [error] [client 12.34.56.78] PHP Fatal error: Call to undefined function views_include() in /var/www/drupal/sites/all/modules/views_attach/views_attach.module on line 188
Next I disable 'views_attach', repeat drush cc and reload the frontpage. Again a WSOD, but pointing to different modules:
For testing purposes I changed the maximum execution time in
settings.php
like so:ini_set("max_execution_time",600);
Again, this leads to a WSOD:
After disabling, the WSOD is still there, but the error moves to Ctools. Repeated "PHP Fatal error":
[Sun Apr 22 02:20:07 2012] [error] [client 65.52.104.88] PHP Fatal error: Call to undefined function views_cache_get() in /var/www/drupal/sites/all/modules/ctools/views_content/plugins/content_types/views.inc on line 47
So the error thrown is not very indicative, but the WSOD stays, as long as Views 3 is active. Again, after downgrading to Views 2.16 everything is back to normal.
Conclusion: The WSOD is directly triggered by Views 3; the site goes back to normal after downgrading to Views 2.16. With this procedure, I believe to have excluded 'views_attach' as the root case. Since the Views version directly switches the WSOD on (Views 3.0) and off (Views 2.12), there is a high probability that the root cause has something to do with Views. Since the update directly results in a WSOD and multiple "PHP Fatal errors", I think a "major" priority is justified.
Comment #11
dawehnerWell views_include IS and always was part of views.module, so if this is missing on the update, something went wrong on the update on the file level. There is nothing views can do about that.
Once views_include fails it's not a wonder that views_cache_get fails, because it required views_include('cache'); before to work. Maybe you have missing this file as well.
GRRRR, i don't see why drupal shouldn't load views.module here.
Comment #12
asb CreditAttribution: asb commentedThanks, obviously I am encountering a situation that should not happen. Since the site runs fine with Views 2, the installation itself shouldn't be too borked; since I am encountering this on different sites, the problem can not be too site specific. I tried switching the WSOD on and of several times by exchanging Views 2.16 and Views 3.0, and for that I downloaded the files multiple times, so I don't believe that anything is missing from the tarball.
PHP Fatal errors:
views_attach.module -> common.inc/theme.inc/node.module -> views.inc [...]
This succession of different "PHP Fatal errors" indicates to me, that the problem is neither views_attach.module, common.inc, theme.inc, node.module, nor views.inc, but something below it. However, I don't know how to debug something like this. Is there anything I can do to help tracking this down?
Comment #13
asb CreditAttribution: asb commentedI was hit by this on just another site. Current success/failure ratio: 50% of all my sites go into a WSOD when udating to Views 3.0 (three sites are OK, three sites can't be updated).
Comment #14
dawehnerYou know it better, but posting "hey it is getting a wsod" doesn't help at all. There are always real php error behind it, see the errors from above.
Please don't be offended but i have the feeling that you maybe do something wrong on the update.
Comment #15
asb CreditAttribution: asb commentedI have no idea what I could do wrong on the update - download the new archive, replace the old views folder, run update.php and clear all caches (drush dl ... ; drush updatedb; drush cc ...). It does not matter if you download and unpack the tarball manually, and #3 is definitely not the problem here; I don't see anything that could be made wrong during the update procedure.
What I can find out myself is already documented in #9 and #10. Actual coding and debugging (as Merlin suggested in #7), beyond following, and trying to resolve the messages in Apache's error.log, is beyond my capabilities.
Btw: The only sites that I could update so far are either extremely simplistic (e.g. no complex Views, no Panels), or the migration started during the development cycle of Views 3 and - maybe - succeede, because I followed the changes from Views 2 to Views 3 in smaller steps.
Obviously, at least part of the problem is that I'm working with real (not synthetic) data; otherways the developers would have run into similar issues themselves. My gut feeling tells me, that the chain of timeouts has something to do with Views' changed behaviour in regard to a) the DISTINCT handling, and b) the paging; imho, both work fundamentally different in Views 3, when working with unaltered Views from Views 2.
Lets assume, that the working View for Views filters out 10 records out of 40,000 nodes, plus it does a DISTINCT that removes a certain number of duplicates from the result set. Additionally, many of my Views are embedded in Panel pages, so mutiple views are run when loading a single page, including the front page. Assuming that the pager settings in Views 3 do not work out of the box as they did in Views 2, a single view might try to load 40k nodes and not 10 (-> timeouts); additionally one might assume that the DISTINCT operator liquidates an average of three duplicates per record in the result set; so the ratio in Views 2 would have been 10 records out of 30 (paging to ten records plus duplicate filtering); the ratio in Views 3 - without editing the Views - might be 120.000 out of 120.000 (no paging out of the box = 40k records in record set; no working DISTINCT out of the box = 40k records multiplied by assumed liquidation rate in Views 2 -> timeouts and probably worse in Views 3). Now permutate this with an average of six Views per Panels page, and you might get an idea where the "PHP fatal errors" might come from, and why they finally end up somewhere in Ctools.
However, this is pure theory and I don't know how to prove it with reasonable effort; also I'm assuming that my observations in regard to DISTINCT and paging are essentially correct. Judging from experience from just two really updated sites is something I wouldn't bet my right hand on, and I have never received confirmation about this.
Comment #16
couturier CreditAttribution: couturier commentedSeeing as dawehener repeatedly says this is an individual problem and we haven't heard from asb in 4 months, I am closing.
Comment #17
asb CreditAttribution: asb commented@couturier: What am I supposed to write? It still does not work, over and over again, once per month, or once per week? That wouldn't make much sense, wouldn't it.
Also I don't see where anyone might have indicated that this actually is an individual problem. The fact still is, that I can not update *any* site to Views 3, except for those two where the update was started with the dev release.
If you want to close this unsolved issue, please use the proper status tag "won't fix".
Comment #18
dawehnerIt is not only you who tried to update from 2.x to 3.x but beside your experience a lot of people actually managed to get it working.
To be honest, this issue is SO unfixable in the sense of too many unrelated comments/informations/etc.
Just a short guess would be read permissions for the files, but i guess you have checked that already.
Comment #19
couturier CreditAttribution: couturier commentedasb, support for Drupal 6 will be dropped in about a year with the release of Drupal 8. You might consider upgrading your site to Drupal 7 now and seeing if that will solve your problem. Most people are working in Drupal 7 already.
Comment #20
asb CreditAttribution: asb commented@couturier: I'll try very hard to not sound hostile, but this kind of suggestions are not helping in any way. You might consider that other people might not be imbecile amoebae, and that there might be reasons to stay with Drupal 6. In our case, all sites we have built during the past eight years, are stuck with D6 because of broken or missing upgrade paths. E.g., 'Image' module, which was used here at d.o a while ago and still has 70k users (!), has no migration path to D6; there is not even a dev release to get Image Attachments into D7; our default input format will not be ported to D6; our access control module will note be ported… I could go on with this for quite some time; in short, Drupal 7 is not even a mid-term option to consider when the sun shines very bright. Also, if we'd seriously consider to migrate without images, without input formats, and without access control, there'd be no Views 2 on D7. So, please forget about bogus like D7 migrations.
@dawehner: If there is anything I can do to help, please let me know [1]. At least the issue is perfectly reproducable for me, which is not the worst starting point to find an error. The nastier question is how much time and energy you are willing/able to spend on this kind of legacy issues, and that one I can not answer for you. Many devs have already left D7 and are heading fo D8, I know that…
[1] What I can provide is administration experience, including Apache troubleshooting and the OS (Debian); we have a dedicated root server, and we can set up a sandbox environment. What I can not provide is PHP debugging capability or prgramming experience.
Comment #21
couturier CreditAttribution: couturier commentedabs, yes I have heard that the upgrade from D6 to D7 was rocky for some. What I did, and what I've heard others did, was to start from scratch in D7 and just build a new site, transferring content over manually. It may sound like a lot of work, but it really didn't take me that long, and I have over 500 URLs on my site with photos attached to essentially every node. By doing it this way, I was able to take advantage of new features in D7 and D7 modules and configure them cleanly from the ground up. If you want to skip D7 entirely and wait for D8, I know of one person who has been able to isolate content and upgrade sites from D5 straight to D7, for example, by pulling in just the pure content in database form. I can direct you to this person if you are interested in that approach. Of course, I'm sure you remember that support is provided only one version back from the present distribution, so when D8 is released around September 2013, the queues for D6 will grow even more quiet than they are at present.
Oh, and this is good news. I heard just about two weeks ago that they are working hard to make the upgrade from D7 to D8 much more smooth this time around. They recognize the D6 to D7 should have been better.
Comment #22
asb CreditAttribution: asb commented@couturier: Yes, start from scratch appears to be the most common "migration" approach to get from D6 to D7. The small issue with this is that we have to deal with 14+ sites, 5-8 years old, with an average of 60k nodes. If we have to start this from scratch, it will be anything but Drupal.
@dawehner: Thanks for your mail; I'll either put a site backup together without image files (~20 GB ;), or simply set up a sandbox and then get back to you (you'll probably need SSH access, I assume). Please give me a couple of days...
Comment #23
couturier CreditAttribution: couturier commentedCheck out this article: Using the Migrate module to handle big data imports
Comment #24
dawehnerThis is why things are hard.
Comment #25
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue