Image Optimizer for XF 2.0

Image Optimizer for XF 2.0 [Paid] 1.1.0

No permission to buy ($29.00)
I uninstalled then installed it again. From what I can tell, it is working now. I am not getting any error.

However, It seems to be starting at the beginning trying to re-optimize all the images that were already optimized by the XF1 version of this addon.

It would be good to be able to have an addon option to start with new attachments and not optimize old attachments!
 
Yes. There are no compatible between versions yet.
@truonglv - Even if there are no compatible between versions, can you make an option to start optimizing with new images only and not to optimize existing ones? Or make an option not to optimize attachments before X number? Anything to prevent it from re-optimizing ALL the files.
 

truonglv

Staff member
Tech Support
@truonglv - Even if there are no compatible between versions, can you make an option to start optimizing with new images only and not to optimize existing ones? Or make an option not to optimize attachments before X number? Anything to prevent it from re-optimizing ALL the files.
Yeah. In next version could be integrate with the old one. I have just rename table and modify some columns.
 
Hello,
I have this error on Server error logs with xenforo 2.1 :
http://prntscr.com/lr5l9k

Code:
XF\Db\DuplicateKeyException: Job Truonglv\ImageOptimizer\Job\Optimizer: MySQL query error [1062]: Duplicate entry '2-attachment_data' for key 'content' src/XF/Db/AbstractStatement.php:217
Generated by: Unknown account 5 Dec 2018 at 18:50
Stack trace
INSERT  INTO `tl_image_optimizer_log` (`new_size`, `old_size`, `processed_time`, `content_id`, `content_type`, `log_date`) VALUES (?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(89): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(172): XF\Db\AbstractAdapter->query('INSERT  INTO `t...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1440): XF\Db\AbstractAdapter->insert('tl_image_optimi...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1172): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/addons/Truonglv/ImageOptimizer/ContentData/AbstractData.php(27): XF\Mvc\Entity\Entity->save(false)
#7 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(110): Truonglv\ImageOptimizer\ContentData\AbstractData->log('attachment_data', 2, Array)
#8 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(51): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'attachment_data', Object(XF\Timer), 2)
#9 src/XF/Job/Manager.php(253): Truonglv\ImageOptimizer\Job\Optimizer->run(G)
#10 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#11 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#12 job.php(42): XF\Job\Manager->runQueue(false, 8)
#13 {main}
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(31) "https://streamweb.io/whats-new/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Hello,
I have this error on Server error logs with xenforo 2.1 :
http://prntscr.com/lr5l9k

Code:
XF\Db\DuplicateKeyException: Job Truonglv\ImageOptimizer\Job\Optimizer: MySQL query error [1062]: Duplicate entry '2-attachment_data' for key 'content' src/XF/Db/AbstractStatement.php:217
Generated by: Unknown account 5 Dec 2018 at 18:50
Stack trace
INSERT  INTO `tl_image_optimizer_log` (`new_size`, `old_size`, `processed_time`, `content_id`, `content_type`, `log_date`) VALUES (?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(89): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(172): XF\Db\AbstractAdapter->query('INSERT  INTO `t...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1440): XF\Db\AbstractAdapter->insert('tl_image_optimi...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1172): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/addons/Truonglv/ImageOptimizer/ContentData/AbstractData.php(27): XF\Mvc\Entity\Entity->save(false)
#7 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(110): Truonglv\ImageOptimizer\ContentData\AbstractData->log('attachment_data', 2, Array)
#8 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(51): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'attachment_data', Object(XF\Timer), 2)
#9 src/XF/Job/Manager.php(253): Truonglv\ImageOptimizer\Job\Optimizer->run(G)
#10 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#11 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#12 job.php(42): XF\Job\Manager->runQueue(false, 8)
#13 {main}
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(31) "https://streamweb.io/whats-new/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
Same error. @truonglv is breaking instead of fixing lol
 
Same errors. Files updated and addon updated.
1544060930256.png
I think it will worth if you use my site for testing before wasting time releasing versions with bugs. It won't take you too much time, I promise.

This is the 4th version you ask me to upload files, update and test. I am kind of tired of doing your work (testing)
 
I have these errors:


Code:
ErrorException: Mismatched result files. $expectedFiles=1 $actualFiles=0 src/XF/Error.php:75
Generated by: Unknown account 9 Dec 2018 at 00:10
Stack trace
#0 src/XF.php(189): XF\Error->logError('Mismatched resu...', false)
#1 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(95): XF::logError('Mismatched resu...')
#2 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(51): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'image_proxy', Object(XF\Timer), 5468)
#3 src/XF/Job/Manager.php(253): Truonglv\ImageOptimizer\Job\Optimizer->run(G)
#4 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#5 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#6 job.php(42): XF\Job\Manager->runQueue(false, 8)
#7 {main}
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(21) "https://xxxxxx.fr/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
and this:

Code:
ErrorException: [tl] Image Optimizer: Seem failed to execute command. $command=/usr/bin/gifsicle --colors='256' --lossy='50' --no-names --output '/home/xxxxxx/public_html/internal_data/temp/xfPMVs6G' '/home/xxxxx/public_html/internal_data/temp/xfW30czL' $output=array ( ) src/XF/Error.php:75
Generated by: Unknown account 9 Dec 2018 at 00:10
Stack trace
#0 src/XF.php(189): XF\Error->logError('[tl] Image Opti...', false)
#1 src/addons/Truonglv/ImageOptimizer/Images/AbstractImage.php(53): XF::logError('[tl] Image Opti...')
#2 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(142): Truonglv\ImageOptimizer\Images\AbstractImage->optimize('/home/streamwe6...')
#3 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(83): Truonglv\ImageOptimizer\Job\Optimizer->optimizeImageFile('internal-data:/...')
#4 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(51): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'image_proxy', Object(XF\Timer), 5468)
#5 src/XF/Job/Manager.php(253): Truonglv\ImageOptimizer\Job\Optimizer->run(G)
#6 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#7 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#8 job.php(42): XF\Job\Manager->runQueue(false, 8)
#9 {main}
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(21) "https://xxxxxxx.fr/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Top