Since upgrading to Ubercart 6.x-2.7 I get the following error popup whenever I try to update the default 'products' page display in the uc_products view:

An error occurred at /admin/build/views/ajax/preview/uc_products.
Error Description: 404: Not Found

All other views on the site are fine.
The path defined by the view (e.g. www.example.com/products) also gives a 404 page not found error.

I've found that removing the filter: "Node: Is a product" fixes the view (but not a solution, obviously). I have also tried filtering based on the regular Node type filter, but that produces the same error. Recreating the view from scratch gives the same problem when the above filter is added.

Does anyone know what might be causing this?



longwave’s picture

Component:Other» Module integration
Category:bug» support
Priority:Major» Normal

No idea what is causing this, but it doesn't happen for me; the filter works as expected, and the Views integration code hasn't changed since 6.x-2.4.

If the "is a product" filter doesn't work can you use the "Node: Type" filter instead?

longwave’s picture

Also, have you tried clearing the cache, changing your theme, or disabling jQuery Update if it's installed? #295246: An error occurred at /drupal/admin/build/views/ajax/preview/ is a similar issue with many possible fixes.

pog21’s picture

Status:Active» Fixed

Thanks for the reply. Got it working... sort of... by recreating the view from scratch (as opposed to creating a new display in the uc view, which is what I was doing previously).

I had been through that thread, but none of the solutions I saw there seemed to help. I had also tried the alternative filter method you mentioned, but that didn't help either. Also disabled jquery update, reinstalled previous versions of uc and views, turned off javascript in views->tools, been clearing cache and visiting update.php like a maniac.

Slightly unsatisfying not to know the cause though, so in trying to find out, I copied all modules and imported the DB to a local install, and the ubercart view worked! I then deleted all the modules and db on live site and copied it all back. But the problem is still there: The view that ubercart provides just gives a 404 error for any pages (or previews of pages) if the "is a product" or "Node: Type: product" filter is present and set to true.

If anyone knows why this might be, I'd be interested to hear about it. Otherwise, I'm happy to just accept that it's reachable by visitors.

Status:Fixed» Closed (fixed)

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

philsward’s picture

Same problem... UC 2.7

Some folks say that removing the "Is a Product" fixes their problem, but that doesn't solve it for me.

Upgraded views from 2.x -> 3.x; no fix
Upgraded UC from 2.7 -> 2.x-dev; no fix

Not using jquery_update

disabled all sorts of modules and still didn't fix it...

Odd thing is, my "404 error" page, is completely blank except for the footer... no "Error 404, Page cannot be found", no header, no nothing, except the footer... (footer shows up if I change themes so it's probably a theme issue)

No idea what to do at this point except re-create the product view like everyone else...

philsward’s picture

Ok, figured it out...

I reverted the view back to the original (not really necessary, just did it in testing the problem)

I don't know why, but the image is what caused the problem for me. I removed the "content:image" from the fields and re-added it which fixed my problem.

I noticed that as soon as I removed the content:image, the view began displaying products (before it was empty and would pop up the 404 error on automatic preview)

akolahi’s picture

#6 Fixed the issue for me. Thanks so much for posting a fix!

nally’s picture

Wow guys... thanks for posting this thread and your solution. It's the weirdest thing.

So I too had an image in my View (which was causing this exact issue), but instead of removing the image (as has been suggested) I noticed that the image had "Group multiple values If unchecked, each item in the field will create a new row, which may appear to cause duplicates. This setting is not compatible with click-sorting in table displays." .... checked, which to me seemed odd.

So, I unchecked it and all was well after that. (Knock wood).

Oh... and one more comment on what may have caused this... I recently upgraded from PHP from 5.2.x to 5.3.x

I have no idea is that's related. (correlation, causation and all that).

I doubt it's an Ubercart problem though... any ideas if this should be reassigned to some other module? Did anyone else have this be caused by 5.2.x to 5.3.x PHP upgrade?

b4comic’s picture

i also get the same problem after Upgrade PHP from 5.2.x to 5.3.x....
my hosting at greengeeks.com

i think the problem arise when image field links to node....
because after i remove image link to node i look ok....

only title will be link to node...

herb_miller’s picture

I got exactly the same problem and used the same solution as nally.
Sequence of events was:
1. Site got updated to PHP 5.3 - which caused a known issue with ctools/includes/cleanstring.inc

preg_match() [function.preg-match]: Compilation failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 1811 in /sites/all/modules/ctools/includes/cleanstring.inc on line 157.

2. I deleted the offending characters \x{d800}-

3. Then, while at it, updated the out of date modules... which included upgrading ubercart (to 6.x.2.11)
4. But I also updated all of these modules: webform, token, phone, page_title, nodewords, image, imagecache, ctools

5. Rather than work on a local copy of the backup I'd taken I resolved the problem by first cloning the view and deselecting the "Group multiple values" checkbox.
AND that seemed to fix it - I no longer got the 404 error from ajax.

6. Then, when that was working I attacked the original view.

7. I might have made a mistake somewhere so I also flushed the image cache for the thumbnails being used in the slideshow.

And voila. It's now working again.

herb_miller’s picture

Further to my comment (#10) I installed my backup locally applied all module updates one by one, applying database updates at the same time, cleared the cache and tested the view for the 404.

When I got to ubercart I updated it version by version from 6.x.2.5 through to 6.x.2.11

At no time did I get the 404 error.

Note; My local version of PHP is 5.3.5 (running on Windows). The version where it went wrong is 5.3.19

Anyway, this is a bit disappointing.
If you can't reproduce an error, how do you know that your fix was the right fix?
So I went back to the main site, changed the view back to how it was and reproduced the problem.
Then fixed it again by deselecting the check box.

Note; My local version of PHP is 5.3.5 (running on Windows). The version where it went wrong is 5.3.19.
My local MySQL is 5.1.45. On my Linux server it's 5.1.65
Memory limit: 128MB on both.

In a further attempt to reproduce the problem I modified a view export from the non-working version into the working system; it worked and a newly exported version exactly matched what I imported.
On the non-working system I got the 404.

I hope that information might be of some help.

geetepunit’s picture

worked for me, good found.

jonpiehl’s picture

The images is the culprit. You have to unselect "Link this field to the node" and change the format to "product image linked to node". I hope that helps.

Wan’s picture

#6 worked for me

dtisom’s picture

Issue summary:View changes

In my case the View was Disabled the whole time.