First of all, I'll post the error I'm getting, then explain the situation:
* warning: preg_replace() [function.preg-replace]: Unknown modifier '\' in /home/---path-to-site-root---/includes/database.inc on line 283.
* user warning: Query was empty query: in /home/---path-to-site-root---/includes/database.mysql.inc on line 120.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 10' at line 1 query: LIMIT 0, 10 in /home/---path-to-site-root---/includes/database.mysql.inc on line 120.
Right now I'm on the final version of 4.7 and was using the 4.7 version of Views...and was getting this error. I saw that the "latest version" of Views was the cvs, so I downloaded that from the views page, installed it and ran update.php (which updated one line in the DB)...but I'm still getting the same error.
This error shows up on *any* page view I create with either version of the module. Block views work fine, but page views are useless.
FYI: I'm on Dreamhost with PHP 5.1.2 and MySQL 5.0.18 (I think).
ANY help would be greatly appreciated. Thanks in advance.
(PS: I marked this critical because the site I'm jamming to finish up is supposed to go into private beta tomorrow and the basic page views don't work. HELP!)
Comments
Comment #1
SavoryMedia commentedWow. After the upgrade to the cvs version, not even my block views work now. I guess it's time to go back, wipe out the views tables and reinstall the 4.7 version. At least my blocks worked then.
Comment #2
SavoryMedia commentedUpdate: It seems to only be teaser list page views that are dying. Table views, as long as there is no block view attatched, seem to work.
I wish I was a hardcore PHP coder (I'm a PHP dabbler)...I'd dive into this and try and find the problem, but I have no clue where to start.
Comment #3
merlinofchaos commentedI'm not even sure where to start either.
Does an updated views still have this error?
Comment #4
saml commented...It seems so. I have this problem, running 4.7.0-version of July 11 2006.
Comment #5
marcoBauli commentedi have another SQL syntax error too. The weird thing is that i disabled *all* my modules (Views also) except the required ones, and the warning doesn't seem to go away!
anyone else experiencing this?
Comment #6
marcoBauli commentedabout #5 above i had to completely cancel a "bad" view to eliminate the warning (it was showing even if Views module was disabled!)
Still i get a particular 'Unknown table 'n'' error for ALL of my views as well, pages, blocks, lists, teasers...and the views contents are not displayed!
Note that this does NOT happen for user 1 (superadmin), but for all anonymous and authenticated.
Comment #7
marcoBauli commentedok, also 'Unknown table 'n'' warning solved: it was (is) a problem with the Full-CRUD patch of CCK content.module.
@Savorymedia: you could try exporting your views, trash the view that has the output code most similar to your SQL error, create a fresh one and (very important!) clean Drupal cache!
that worked for my error
Comment #8
merlinofchaos commentedStill having trouble figuring out anything to do about these.
The problem really is that these kinds of errors need to be distilled down to absolute minimums. What is the minimum setup necessary to reproduce them. I don't see these errors on my base 4.7 installs with just Views, and that leaves me at a loss.
Comment #9
merlinofchaos commentedWithout more information I'm closing this issue. Sorry.