Had the exact same experience as this guy http://drupal.stackexchange.com/questions/10932/view-page-displays-page-...

I left an answer there describing what I did to fix it, which was to make sure the Views "link this field to its node" setting wasn't on at the same time as the imagecache preset linked to node format.

The view was working fine on a shared hosting environment, nobody logged into the site with any admin account and it was definitely working last week. This afternoon, received an email from the client complaining that the view was broken.

- cloning the view did not help
- exporting and reimporting the view did not help
- after getting a database dump and rebuilding the site locally on my laptop running nginx I could not reproduce the problem
- reimporting a version of the view I had saved on an old dev version of the site did not work
- turning off the redundant "link to node" setting fixed the problem immediately
- turning the redundant setting back on caused the issue to return
- the redundant setting also seems to be the only thing in common between my situation and what I found on Drupal Answers

this could also easily be an issue with imagecache or pressflow, or even something to do with the server configuration because I couldn't replicate the issue locally but all the relevant .htaccess files were unchanged from what is distributed with pressflow so I'm not sure what else I could try.

memory limit should not be a problem (128MB i think, have plenty of other Drupal sites on this host) and i tried loosening file/folder permissions on the server recursively for the "sites" directory. Checked all the uploaded images that imagecache would be processing and none are larger than 150k so really, memory should be fine for this particular page as there's nothing on it but a grid of images and a few exposed filters.

also cleared the cache multiple times through drush and the UI to rebuild the menu, cleared the Views cache and enabled and disabled gzip compression. Checked the menu_router table in the database to see that the path was there.

the replies in the question in Drupal Answers reference Boost, but it is not installed on this site.

I would flag this as minor because afaik the problem is pretty obscure in the overall scheme of all sites using Views but the scary part is that the fact that i can't see any reason why the view would be working one day and not the next - it should really have never been working at all rather than suddenly failing. Unfortunately that means I wouldn't know where to start re: providing a patch... sorry!

Comments

thedavidmeister’s picture

Just checked with the host, they haven't changed anything on that server in the last month.. so weird.

juan.pinedaf’s picture

I've got the same problem

What I'm doing as a temporary solution to get my page rendering is creating a blank basic page with the path I need, putting the view as a block and display that block in the basic page I created.

Not great but at least I get the page displaying....

thedavidmeister’s picture

mmm, arguably that's a better way to do things if you're dropping in your view blocks with context. I was actually seeing this problem even when the view was a block.

baxang’s picture

Version: 6.x-2.12 » 6.x-2.11

+1. The same issue is driving me crazy.

thedavidmeister’s picture

Title: Page not found for page view that was previously working » 404 error for page view that was previously working when using an imagecache preset linked to a node in a field linked to a node

The problem appears for me intermittently across multiple projects that I move from dev onto a shared hosting environment when they're approved for production.

I recently saw this problem again on a different project.

Having "link this field to the node" and selecting an imagecache preset linked to a node at the same time seems to be the problem. Removing the redundant linking fixed the problems.

baxang, can you check all your fields for suspicious link settings and report back?

baxang’s picture

Thanks thedavidmeister for the comment.

My situation is probably different from yours since I have no imagecache preset/field linked to any of my views that have 'page not found' problem.
I have a dozen of Views and as far as i know 3 of them have the issue.
The first one is calendar and its public page doesn't render.
The other two are similar as both of them have a table-style page display and a feed display for exporting csv and they are used for administrate a certain content type (no public display).
Both page displays are working fine, but clicking on the csv buttons lead to 'page not found' on the two page displays.

This is the exported settings for my views https://gist.github.com/2916502

To solve this problem, I am trying to inspect routing and hooks, but don't really know where to start :(

thedavidmeister’s picture

csv? don't you need http://drupal.org/project/views_bonus for that to work out of the box? sure it isn't an issue with that module?

baxang’s picture

I have that module installed and it worked well for more than one year. And the problem I have is not only csv. I have a calendar view and it displays 'page not found' too.

I tried Devel module with Firebug for Drupal, but on the 'page not found' pages Devel doesn't work at all. And live preview is not working for those views. When try an alert prompts 'page not found'.

Could you tell me how to inspect the routing part of Drupal?

thedavidmeister’s picture

all the times I've seen this problem have been related to imagecache. Either the linking thing I described or not having a high enough memory limit on a shared server to generate my images and the out of memory error killed the view in a similar way.

you've tried poking around in the menu_links and menu_router tables?

do you have a local version of the site where you can replicate the problem? I know you said dpm() wasn't working but have you tried putting some in the core menu module to see if your paths come through there?

has anything changed recently in the server environment this site is hosted on?

baxang’s picture

Thank you for your advice.

I agree that this issue is somehow related to memory consumption or other resources shortage. Since I have no imagecache field used for my views, it turned out that my views' displays are using so much memory.

I upgraded Views module to the latest version (6.x-3.0) and it brought my calendar page back. But the other feed displays didn't. I dug into it with classic and simple die() :) and found the script dies somewhere inside $this->display_handler->execute() in modules/views/includes/view.inc. Then I tried to do the same taks with Drush using Views_data_export module and it crashed with a memory allocation error. At that time memory_limit was 220M which I think was enough. Increasing the limit by 1000M removed the error, but this time I got 'MySQL server has gone away' error due to the maximum_allowed_packet size was exceeded and the value cannot be increased as the hosting is shared environment.

Here is what I got from the hosting support. They have a monitoring process that kills any process using 550M or more memory. (They said this policy has recently implemented.) But I can use up to 750 to 1000M from the command line. However, I just could export approx 100 records from view A and 300 records from view B which are only 10% of the total.

I'm not sure why my views consume so much memory while the size of csv files would not be larger than a couple megabytes. I am discussing this with my client and would solve this by creating another script for csv generation.

Any suggestions would be appreciated.

thedavidmeister’s picture

This is a csv export right? so exporting the data in a useable way isn't going to be half as bad as trying to make something valid XML or an RSS feed.

Using Views is going to be heavy when you've got so many rows even if just because it calls tpl.php files for the View, for individual rows, and for each field.. Calling tpl.php files 4000+ times in a page load on shared hosting sounds pretty bad to me. Especially if you don't have anything cached and aren't running APC and generally can't control your server environment at all.

Here's something quick and dirty to try that shouldn't blow your memory like that and be relatively quick to implement. It might be enough, depending on what exactly is at "the other end" trying to read this export.

1. Create a new path with hook_menu with an callback function you'll use to render your CSV
2. Run the preview of your View, copy and pase the SQL query that is automatically generated by Views and displayed above the preview into db_query in your rendering function (and put curly brackets {} around the table names..)
4. Loop through the result in your rendering function and print the output rather than returning it
5. exit(); just after printing your CSV
6. Don't tell anyone you don't trust what your feed path is and don't hit it too often as I'm pretty sure you just broke Drupal's in-built caching (among other things) for that particular path

Ubercart (the gold standard of Drupal coding practice :P) actually does something a lot like this to display their "CCV info" popup on the checkout page while bypassing the Drupal theme system, so it works.. look at uc_credit_menu and uc_credit_cvv_info for an example

Anyway, I think we've figured out that your problem is unrelated to this issue so if you've got more questions, please open a new support ticket and reference it here.

thedavidmeister’s picture

Also you should expect that the size in bytes of the rendered output has little to do with the peak memory consumption in the process of rendering it... Imagine the memory required to resize and convert a 20MB png image into a 50kb jpg image on the server, it would be more than 50kb wouldn't it?

baxang’s picture

Thank you very much for the instruction. That's exactly what I was looking for. One more thing I considered was filtering, but my client and I could work out that it will be ok not to have filtering options as they can sort them out in Excel ;)

Anyway I appreciate your help as I am not a full-time Drupal developer.

chaiwei’s picture

I removed the imagefield in view and re-add in the field again.

adr_p’s picture

I have a similar problem. Two of my views, both using table display, once for a while just return 404 not found errors. None of them have any image fields or is using imagecache, none of them is using cache. They're pretty simple administrative views, but they're utilizing exposed filters (but there also other views that use them and 404 error is not affecting them).

To make the views work again I'm visiting admin/build/modules page. Unfortunately I've never got to the heart of the problem.

thedavidmeister’s picture

Please only post here if you're having *exactly* the problem described. I'm pretty sure there's a memory issue caused by an infinite loop or similar in the doubling up of creating links. If that's not the problem you're experiencing open a new ticket. You can reference this issue from yours if you want.

It's highly likely that what you're describing in #15 was caused by a corrupt system registry or cache, which are rebuilt when you go to the modules page. You probably moved the views module, or the module providing these particular views or something similar.

Reporting seemingly similar but probably unrelated issues in a single thread will basically guarantee they all never get addressed.

Chris Matthews’s picture

Status: Active » Closed (outdated)

The 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