GoodForNothing Image Optimizer [Paid] [Deleted]

BD Attachment store no longer work, S3 settings no longer show on the Attachment admin page. All images previously uploaded via BD Attachment store no longer display in threads

I hope you made a quick SQL backup and already restored it from that. I'm using the [bd] Attachment Store add-on as well, but it is a very dangerous mod! Whatever you do don’t uninstall it without making an SQL backup first because if you do you will never get your attachments linked back to the posts even if you reinstall it again. You have to make an SQL backup first. Then if its gets corrupted when installing other add-ons you have to uninstall them including the Attachment Store add-on itself, then reinstall the Attachment Store add-on fresh, then restore the SQL backup last. It's the only way your attachments will still be linked to your posts. I know it sounds a bit confusing, but just reuploading the Attachment Store files and folders and then restoring the SQL backup won’t do it. I went through the same thing a while back and that's what I had to do to link the attachments back to my posts. It's probably due to template mods the add-on makes when you install it. Luckily I always make the quick SQL backup before I change or update anything. Hopefully it's not too late in your case.

I’m not seeing any problem with the Attachment Store v1.2.2 add-on and this v1.0.1 Update 2 add-on. I did notice something at first, but he already corrected it, at least for my server and setup below.

XenForo 1.5.10a
PHP 5.6.25
SQL 5.6.30
BD Attachment Store 1.2.2
GFNio 1.0.1 Update 2
GFNcore RC 10
.
 
I hope you made a quick SQL backup and already restored it from that. I'm using the [bd] Attachment Store add-on as well, but it is a very dangerous mod! Whatever you do don’t uninstall it without making an SQL backup first because if you do you will never get your attachments linked back to the posts even if you reinstall it again. You have to make an SQL backup first. Then if its gets corrupted when installing other add-ons you have to uninstall them including the Attachment Store add-on itself, then reinstall the Attachment Store add-on fresh, then restore the SQL backup last. It's the only way your attachments will still be linked to your posts. I know it sounds a bit confusing, but just reuploading the Attachment Store files and folders and then restoring the SQL backup won’t do it. I went through the same thing a while back and that's what I had to do to link the attachments back to my posts. It's probably due to template mods the add-on makes when you install it. Luckily I always make the quick SQL backup before I change or update anything. Hopefully it's not too late in your case.

I’m not seeing any problem with the Attachment Store v1.2.2 add-on and this v1.0.1 Update 2 add-on. I did notice something at first, but he already corrected it, at least for my server and setup below.

XenForo 1.5.10a
PHP 5.6.25
SQL 5.6.30
BD Attachment Store 1.2.2
GFNio 1.0.1 Update 2
GFNcore RC 10
.

Thank's

I kinda got to this conclusion overnight re bd attachment store, but now certain of path forward thanks to your post.

Do not have a local SQL backup (I backed up server folders but not the sql, doh! rookie mistake) - have set the wheels in motion to recover SQL from my ISP's nightly backup for which they charge a hefty effing premium so they had better deliver.

It appears that xf_attachment_data is the critical table and that narrowing it down even more it is bdatachmentstore_options column the key. Would you concur with that?

Nothing else in that table has been lost. Worse case scenario it may be possible to write a script that repopulates it as intended.
 
Last edited:
It appears that xf_attachment_data is the critical table and that narrowing it down even more it is bdatachmentstore_options column the key. Would you concur with that?

That's the table and if I remember it modifies the hash (file_hash) column. I'm trying to remember what happens when you uninstall the add-on, but I think it tries to reset it back to xenforo default so the attachments will no longer show up in the posts afterwards and there is no way to get them back just by reinstalling the add-on again without also restoring the table before you uninstalled it. I'm not 100% positive about that though because it was over a year ago when I did it, but it was something like that if not exactly that. It’s a good and useful add-on, just a very dangerous one if you are not careful and know what you are doing. Since this image optimizer add-on plays around with it some you should always make an SQL backup before installing it and before each update until he gets everything working 100%. Just do it via your cPanel if you have one or install this add-on: [SolidMean] ForumBackup. I use that instead and just quickly run the cron manually from the ACP before I perform any new installs or updates.
.
 
thanks

file_hash column has retained all the correct data. I have tested about twenty and all were correct so there appears to be no corruption or errors.

as far as i can tell (in my case), the only column that is missing data that is causing the loss of images is bdattachmentstore_options bdattachementstore_engine is also empty but could simply be populated with 's3' for every entry.

Thanks for the heads up on the forum backup add-on. That looks the business.
 
In Queue List besides a clear, it would be nice to have the post linked to.

I second that icon_thumbup.gif icon_thumbup.gif

as far as i can tell (in my case), the only column that is missing data that is causing the loss of images is bdattachmentstore_options bdattachementstore_engine is also empty but could simply be populated with 's3' for every entry.

You know what? I'm using ftp with the Attachment Store add-on and you guys are using S3. That could be why my error was fixed with his last update and yours hasn't been yet. One thing the attachment store add-on does though is modify the hash and includes your ftp username when using it in ftp mode. I dont know what it does when in S3 mode. That was the problem I had though because I changed servers and with a new ftp username I wasn't able to rebuild any attachments still connected to the old ftp username.
.
 
Last edited:
Got back a few hours ago. Thanks for your patience everyone :)

From my test with [bd] Attachment Store using FTP and external data path, everything gave out a green signal and that would be because the add-on has a helper method that is being used by other devs that makes a local copy of the image being processed from external sources like S3 or FTP and once it is processed the file is resent to the storage and appropriate data is updated (the "bdattachmentstore_option" column of "xf_attachment_data" table). So I am not sure why the attachments wont work and I'll need to investigate further to find out what might be causing the issue.

Still found a bug
Disabling the add-on shouldn't have fixed the issue with the thumbnail as it doesn't do any change to the front-end. Something else is happening here.

would be a problem if I rebuild images with JpegOptim and OptiPng, and then after that (when bug with Optimus will be fixed) run Optimise?
I'll look into the issue with Optimus. And no, it wont cause any issue if you run the rebuild.

In Queue List besides a clear, it would be nice to have the post linked to.
This is where things get a little more complicated as not every image can be linked back to the source (for example, proxied images).
 
From my test with [bd] Attachment Store using FTP and external data path, everything gave out a green signal and that would be because the add-on has a helper method that is being used by other devs that makes a local copy of the image being processed from external sources like S3 or FTP and once it is processed the file is resent to the storage and appropriate data is updated (the "bdattachmentstore_option" column of "xf_attachment_data" table). So I am not sure why the attachments wont work and I'll need to investigate further to find out what might be causing the issue.

Are you testing it with Attachment Store v1.2.2 or v1.2.1? The guy made a change, but never released it here on xenforo. You have to download it from xfrocks.com instead. That developer in Vietnam is somewhat of a problem because whenever you have a real problem he will not help you and just ignores it. It’s a shame because he has some really good add-ons.
.
 
Are you testing it with Attachment Store v1.2.2 or v1.2.1? The guy made a change, but never released it here on xenforo. You have to download it from xfrocks.com instead. That developer in Vietnam is somewhat of a problem because whenever you have a real problem he will not help you and just ignores it. It’s a shame because he has some really good add-ons.
.
I believe it was 1.2.1. I'll take a look at version 1.2.2. Thanks for the info!
 
I'll look into the issue with Optimus. And no, it wont cause any issue if you run the rebuild.
I understand that, but my question is will there be any optimising with Optimise.io if you allredy optimise images with JpegOptim and OptiPng?

And could you please answer to my other questions,

I have Optimus code, and I enabled Optimus. Optimus take care only for jpeg and png. I also enabled gifsicle because it take care for gifs.
What to do with JpegOptim and OptiPng. I have installed them on server. Should I enable them too?

Also, it is said that higher number have priority on starting first. So, if I setup Optimus 10, JpegOptim 100 and OptiPng 100, then Optimus will started first and if it take care for png and jpeg/jpg images, what will than JpegOptim and OptiPng do?
Or I have to disable JpegOptim and OptiPng if Optimus is enabled?

when rebuilding is done, all new images will be rebuilded through deffered task (I selected that option), so I do not have to do nothing after first rebuild?


I also think that Optimus not working.
I tried to rebuild images with only optimus and gifsicle enabled. And all I can see in queue list is that gifcle did the job

View attachment 141998

and in error log are all jpeg and png images.

View attachment 141999

When this bug will be fixed, I should disable gifsicle and enble only Optimus and rebuild all images again? Or ..?
 
I understand that, but my question is will there be any optimising with Optimise.io if you allredy optimise images with JpegOptim and OptiPng?
The next version I am working will skip the images that have already been optimized.

I have Optimus code, and I enabled Optimus. Optimus take care only for jpeg and png. I also enabled gifsicle because it take care for gifs.
What to do with JpegOptim and OptiPng. I have installed them on server. Should I enable them too?
You can enable them as a "backup handler" so that if optimus fails for some reason the next handler will process the image. (This will be based of the priority that is set.)

Also, it is said that higher number have priority on starting first. So, if I setup Optimus 10, JpegOptim 100 and OptiPng 100, then Optimus will started first and if it take care for png and jpeg/jpg images, what will than JpegOptim and OptiPng do?
Or I have to disable JpegOptim and OptiPng if Optimus is enabled?
100 > 10 ;)
JpegOptim will be called first as it has a higher number set than Optimus.

And last question for now, when rebuilding is done, all new images will be rebuilded through deffered task (I selected that option), so I do not have to do nothing after first rebuild?
No, you wont have to do anything after that as the add-on will automatically process the images from now on.

When this bug will be fixed, I should disable gifsicle and enble only Optimus and rebuild all images again? Or ..?
No need to disable gifsicle as already processed images will be skipped.
 
I just installed the update and enabled only Optimus.IO and I got the error in the log below when trying to upload 3 jpg files. Below is the error for one of the 3 files. This is before trying to post the post, just uploading only and not using deferred.

Code:
Error Info
Message: imagejpeg(/home/me/public_html/data/attachments/4/4047-8549412b3b7302785a200c7b0b4601f0.jpg): failed to open stream: No such file or directory
post(4047), 1 minute ago

Extra Data
array(5) {
  ["error_date"] => int(1476478545)
  ["error_type"] => string(14) "ErrorException"
  ["file"] => string(28) "library/XenForo/Image/Gd.php"
  ["line"] => int(279)
  ["trace_string"] => string(1665) "#0 [internal function]: XenForo_Application::handlePhpError(2, 'imagejpeg(/home...', '/home/me/p...', 279, Array)
#1 /home/me/public_html/library/XenForo/Image/Gd.php(279): imagejpeg(Resource id #153, '/home/me/p...', 1)
#2 /home/me/public_html/library/GFNIo/StorageHandler/Attachment.php(110): XenForo_Image_Gd->output(2, '/home/me/p...', true)
#3 /home/me/public_html/library/GFNIo/StorageHandler/Attachment.php(48): GFNIo_StorageHandler_Attachment->_generateThumbnail('/home/me/p...', 2, '/home/me/p...', Array)
#4 /home/me/public_html/library/GFNIo/Model/ImageOptimize.php(154): GFNIo_StorageHandler_Attachment->updateFileInformation(4047, Object(GFNIo_Image))
#5 /home/me/public_html/library/GFNIo/Model/ImageOptimize.php(83): GFNIo_Model_ImageOptimize->_optimize('post', 4047, false, NULL)
#6 /home/me/public_html/library/GFNIo/Extend/XenForo/Model/Attachment.php(31): GFNIo_Model_ImageOptimize->optimize('post', 4047)
#7 /home/me/public_html/library/XenForo/ControllerPublic/Attachment.php(205): GFNIo_Extend_XenForo_Model_Attachment->insertUploadedAttachmentData(Object(XenForo_Upload), 1)
#8 /home/me/public_html/library/GFNIo/Extend/XenForo/ControllerPublic/Attachment.php(21): XenForo_ControllerPublic_Attachment->actionDoUpload()
#9 /home/me/public_html/library/XenForo/FrontController.php(351): GFNIo_Extend_XenForo_ControllerPublic_Attachment->actionDoUpload()
#10 /home/me/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#11 /home/me/public_html/index.php(13): XenForo_FrontController->run()
#12 {main}"
}
 
Last edited:
Does the folder /home/me/public_html/data/attachments/4 exist in your file system?

No, because I am using the Attachment Store add-on. That 4 is probably the xenforo default folder which I do not have. I have a different folder structure per the Attachment Store add-on.

Again, that is before trying to post the post, just uploading only and not using the deferred process. I dont have the default xenforo attacment folder structure so the "4" folder in not there.
 
Last edited:
No, because I am using the Attachment Store add-on. That 4 is probably the xenforo default folder which I do not have. I have a different folder structure per the Attachment Store add-on.
I wasn't able to look into [bd] Attachment Store today so I am guessing they have also changed how the external data is handled. I will have a look at it tomorrow and hopefully push a fix soon :)
 
I wasn't able to look into [bd] Attachment Store today so I am guessing they have also changed how the external data is handled. I will have a look at it tomorrow and hopefully push a fix soon :)

I'm also using it in ftp mode and the files are just going into different folders on my server so they are really not external, at least in that sense they are not and my folder structure has not changed with any of the Attachment Store updates. It's been the same since day one. I'm using that add-on as a workaround to get around the 128M file upload limitation via the xenforo interface on my server via the hosting company. That way 1GB or larger files can be uploaded if necessary, but anything anyone uploads, images and all, are done via ftp as a result. Hopefully that helps some...
.
 
Top Bottom