The attached patch fixes the behavior.

CommentFileSizeAuthor
#15 phpadmin.gif80.42 KBrobo_arnold
#13 NoImagesShowUp.jpg23.32 KBsaml
img_assist_2.patch754 byteskkaefer

Comments

terraj’s picture

For one of my image categories, I still get this "No images were found" error when the number of items in the category is more than 16 items.

terraj’s picture

Now this is extremely strange but I did some tests and it seems that if I were to run the queries that were parsed into directly into phpmyadmin, for example
SELECT n.nid FROM node n WHERE n.type='image' AND (n.uid = OR n.status = 1) ORDER BY n.sticky DESC, n.created DESC

I get 0 results.

But once I remove the ORDER BY clause, the missing items appear. Very weird! I'm beginning to wonder if this is a MySQL bug

terraj’s picture

Sorry for the multiposts but I forgot to mention I was using MySQL 4.1.18. Perhaps MySQL 5 doesn't have this problem

Standart’s picture

I have the same problem and I think this may be a mySQL problem, too. I have a similar problem with the image module.

http://drupal.org/node/53756

robo_arnold’s picture

I have the exact same thing with Drupal 4.7, TinyMCE 2.0.6.1 and latest Img_Assit. I am running MySQL 4.1.7. The images will appear once I remove the ORDER BY clause.

What's the best solution? Anyone can confirm if this is indeed a MySQL issue. If so, what release this bug is fixed for good? This is first time I come across something that is related to MySQL. However, how am I suppose to host it since many hosting companies are still using MySQL v4+.....

benshell’s picture

Img_assist works fine in MySQL 4.1. I see that the UID is missing in the query terraj pasted in. That's the problem. I don't know why it's missing, but that's why the query won't work.

benshell’s picture

Title: img_assist always displays "No images were found" » MySQL
Status: Needs review » Active

I may have spoke too soon... I just read the issue that Standart referenced. Maybe there is something else going on here. It looks like there are three of you that have seen this issue... terraj, Standart, and robo_arnold. Try the queries on http://drupal.org/node/53756 and see if they work. If they don't, this would certainly appear to be a MySQL bug. That would be really strange though as this is not a complex query.

As I posted on this other issue, have you had a chance to try these queries on a different MySQL install? If you don't have access to another host, could you download and install MySQL on your workstation?

benshell’s picture

Title: MySQL » MySQL query fails to return any results

Oops, I started renaming the issue and didn't finish.

kkaefer’s picture

You forgot me, I did also experience that behavior or I wouldn't have opened the issue ;).

benshell’s picture

Sorry, I actually wasn't sure if your original issue was the same. What version of MySQL are you using? And have you tried the queries that Standart put on http://drupal.org/node/53756?

kkaefer’s picture

You are right, my problem was different. However, it is solved now. Thanks!

robo_arnold’s picture

I just tried the queries and received the same behavior as reported by Standart.

I have also just ported my local site over to my hosting company and the site works great there. All sql queries pass and I can go back to the original files. It is running on Linux, MySQL 3.23.58. Wonder if this glitch only occurs on Windows platform... Just a wild guess.

saml’s picture

StatusFileSize
new23.32 KB

Img_assist, image and drupalimage works fine together when using img_assist of 9:th April 2006 and NOT creating any image galleries at all!

But as soon as I upgrade to the latest img_assis (of 18:th July 2006) or add an image gallery it breaks and gives the "No images were found"-problem.

(It tells the total number of uploaded images in the dropdown-menu for image-galleries though!, see attached screenshot)

Tested also to upgrade to the latest image module without change.

I'm running Drupal CVS version from http://ftp.osuosl.org/pub/drupal/files/projects/drupal-cvs-4-7.tar.gz, downloaded 14 July 2006. (Upgrading to any later version breaks my site totally: http://drupal.org/node/74349 )

I'm running ApacheFriends XAMPP Lite version 1.4.16, (on Windows XP) which has:
+ Apache 2.0.54
+ MySQL 4.1.14
+ PHP 5.0.5 + PEAR (basis package)

saml’s picture

Sorry for multipost... i should of course have checked what was proposed in the original post first:

Removing the sorting:

ORDER BY n.sticky DESC, n.created DESC

on line 666, 669, 674 and 677 fixes the problem!

robo_arnold’s picture

StatusFileSize
new80.42 KB

Seem like I received some warning messages about the indexing on the Node table. Not sure if they're related to this issue or not though. See screen shot. All other tables are fine, no warning message.

darren oh’s picture

Status: Active » Needs review
darren oh’s picture

Status: Needs review » Closed (won't fix)

The original issue is fixed. Subsequent comments refer to a MySQL bug that we can't fix.