I have upgraded to 6.x-2.0 alpha2 and have views enabled and the image assist pop-up for attaching images was only showing published images. I need it to show unpublished images too, so I removed the 'published=yes' filter from the img_assist_browser view.

However, now the number of images is not shown in the drop-down text options. It just shows 'My Images ()' and 'All Images ()'. The grid of image thumbnails is fine, it is just the value of $myimages->total_rows has nothing in it (in img_assist.module function img_assist_header_form)

CommentFileSizeAuthor
#3 _img_assist.gettotalrows.patch.txt1004 bytesjonathan1055

Comments

jonathan1055’s picture

Done some further testing. In function image_assist_header_form, for the un-modified default view there is an item in the view object called get_total_rows which has value 1. In the modified view this item does not seem to appear. I added:

  $myimages->get_total_rows=1; // added this as it is lost when the default view is amended

before the row that calls $myimages->execute(); and it now does return a value in $myimages->total_rows

So the question is, why is the item get_total_rows missing when the the default view is modified to drop one filter condition, and can it safely be reset here. The same is required in the next chunk, ie $allimages->get_total_rows=1;

Can these mods be added into the next patch?

corbacho’s picture

Same issue here with Image Assist 6.x-3.x-dev and 6.x-1.0-alpha4. I just installed them and they where working fine until suddenly they stopped working, after some hours, I couldn't say what I have touched. Because the CSS of Image Assist doesn't affect, or m

Anyway, thanks jonathan1055 for offering your solutions. It happens to me the same: Not images shown after upload them through Image Assit.
Even I publish them and put them in front page, they didn't appear . Also admin or authenticated user.

I went to views as you said, turn of Published and now is fine.

Also I have made the changes $myimages->get_total_rows=1 and $allimages->get_total_rows=1 to get the numbers again.

But I would like to have numbers also by terms (I have a vocabulary for images), but this doesn't follow the same logic than before, there is not get_total_rows in that part of the code. Some help?

UPDATE. It count's by terms too, not necessary any other fixing about counting.
I found that the problem is when I press the button "image assist" by TinyMce 3, then it doesn't store the taxonomy.
But if I go to "create content" -> Image -> and I select the taxonomy there, IT store it.
Should I put this in a new issue?

jonathan1055’s picture

Version: 6.x-2.0-alpha2 » 6.x-2.0-alpha3
Status: Active » Needs review
StatusFileSize
new1004 bytes

Here is a patch for the two lines that need to be added. Created against 6.x-2.0-alpha3.

sun’s picture

Status: Needs review » Fixed

Thanks!

Committed with slight modifications to all 6.x branches.

jonathan1055’s picture

Thanks.
Yes I should have used TRUE not 1

Status: Fixed » Closed (fixed)

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