Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OLD-6854: Recreate Thumbnails limited to 100 images #70

Closed
cpaschen opened this issue Oct 21, 2012 · 0 comments
Closed

OLD-6854: Recreate Thumbnails limited to 100 images #70

cpaschen opened this issue Oct 21, 2012 · 0 comments

Comments

@cpaschen
Copy link
Member

Description

Recreate thumbnails in tiendav0.9.0preRelease-O only recreates for the first 100 images. This means it doesn't work in the real world.

History

#7 Updated by Rod Farrell about 1 month ago

For want of any third party feedback this solution is working on a number of sites with no issues reported so I would request it be added to the official code.

#6 Updated by Chris DioscouriChris Paschen. 7 months ago

Status changed from Unconfirmed to Requires Feedback
Assignee set to Lukas Polak

#5 Updated by Rod Farrell 7 months ago

Found the code. At line 1782 of administrator/components/com_tienda/controllers/product.php is the code:

$per_step = 100;
$from_id = JRequest::getInt('from_id', 0);
$to_id = $from_id + $per_step;
$done = JRequest::getInt('done', 0);

This limits the resize of thumbs to product ids 0 to 100.

The code is then supposed to cycle through 100 images per time, resetting $from_id at the end of each cycle if $done < $count
It looks to me as if $count is set AFTER the list has been filtered to 100 images which means it will always be 100.

$model = $this->getModel('Products', 'TiendaModel');
$model->setState('filter_id_from', $from_id);
$model->setState('filter_id_to', $to_id);

$row = $model->getTable();
$count = $model->getTotal();

I moved "$count = $model->getTotal():" to the line before "$model->setState" and I'm pretty sure this resolves the issue but it needs to be looked at by better programming minds than mine.
#4 Updated by Chris DioscouriChris Paschen. 8 months ago

Thanks for the info.

We'll take a look at this in the 0.9.3 'admin interface cleanup' round.

In the mean time, if you happen to find the line of code (or the reference to it) please add a reference here.

Also ... if you have time to upload directly (no using the Shape5 system) that would be good to know also (to be sure that we're not running into some limitation with them - although I can't imagine what that might be).

#3 Updated by Rod Farrell 8 months ago

There are no error messages. The process appears to complete properly but only recreates images 1 to 100. I have deleted the thumbnail for image 120 and it still doesn't get recreated. In this case ALL products were created and ALL images uploaded via the Shape5 Tienda Bulk Upload tool. They were uploaded and created as a single batch so there is no difference between images. Running Joomla 1.5.25, PHP 5.3.5, MySQL 5.5.8

I'm sure I have seen this reported previously somewhere, and there was apparently a line of code specifically restricting the number of images to be processed to 100 but I have no idea what file that was.

#2 Updated by Chris DioscouriChris Paschen. 8 months ago

Category set to Admin - Images
Status changed from New to Unconfirmed
Priority changed from High to Normal
Target version set to Version 0.9.3 - Admin Interface Cleanup

#1 Updated by Chris DioscouriChris Paschen. 8 months ago

Rod,

Can you tell me happens after 100 (or to image 101).

Do you get any error messages?

Also, what version of PHP, Joomla, and MySQL are you running?

AND ... how did the images get uploaded to the site (what app/process did you use?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants