Loading


Advertisement:

Author Topic: [Plugin] Pre-resize Images (v. 2.1.0 released)  (Read 10183 times)

xop32

  • Jr. Member
  • **
  • Posts: 51
  • remember - the trend is your friend
Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
« Reply #120 on: January 08, 2017, 01:20:45 am »
hello Tesco

I was just wondering if you ever do freelance work on osclass based sites, I am currently looking for someone to help me on a project

teseo

  • Hero Member
  • *****
  • Posts: 5642
Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
« Reply #121 on: January 23, 2017, 04:36:44 pm »
Hi,

Already available update 2.1.0:

Quote
Changelog:

+ Fixed Drag & Drop images on Microsoft IE 11 / Edge (Thanks to developerchris :)
+ Restored "Make Primary Image" buttons (only on Publish Ad).
+ Fixed bug on Edit Ad when Decent Mobile Theme plugin is used.

Regards

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 1536
  • osclass.work
Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
« Reply #122 on: January 24, 2017, 11:53:29 pm »
Thanks teseo, really nice update! ;)

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2228
Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
« Reply #123 on: March 03, 2017, 04:35:59 pm »
Hi teseo,

can you have a look at the deletion of uploaded files in latest version?
After uploading 5 files with ad, deleting two again I can see in tmp folder still all 5 uploaded files, they are not removed.

In code I see you call the Osclass "delete_ajax_upload" in url but when looking at Osclass ajax.php it also needs a parameter called "qquuid" to actually delete the uploaded file in the temp folder. I messed around with the url string by adding "&qquuid=" but I haven't been succesful in getting the right filename/id when deleting an image.


Regards,
Eric

teseo

  • Hero Member
  • *****
  • Posts: 5642
Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
« Reply #124 on: March 03, 2017, 07:23:10 pm »
Hi Eric,

Couldn't see any issue here, when I click on Delete on the frontside, the file in /oc-content/uploads/temp is immediately deleted... ???

Regards
« Last Edit: March 03, 2017, 07:25:08 pm by teseo »

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 1536
  • osclass.work
Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
« Reply #125 on: March 04, 2017, 02:32:55 am »
Even if not deleted (could be permissions/user issue), cron should take care of them in an hour or two, eventually.

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2228
Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
« Reply #126 on: March 04, 2017, 03:27:22 am »
Hmmm weird.

Uploads/tmp folder is owned by apache and has correct rights.

If I upload images they appear in uploads/temp folder as expected.
When I upload three images at once and I do not publish the ad and start removing the images I just uploaded only 1 out of three is removed from temp folder. -> Not good.

Now if I upload only 1 image, do not publish ad and remove image again the image is indeed removed from the temp folder. -> Good
 
Scenario Publish Ad:
Upload images -> I do publish ad -> OK - all images have been moved from temp folder to image folder and ad is published -> Good

Scenario Edit Published:
Edit published ad, removing images OK - images are removed from image folder -> Good

Now, I am pretty sure if 1 gets deleted or all get moved there is no issue of folder rights/ownership.
The issue is ONLY happening when uploading more than 1 image and in all cases only 1 image really gets deleted and all others are not removed from temp folder.


Regards,
Eric

Hi Eric,

Couldn't see any issue here, when I click on Delete on the frontside, the file in /oc-content/uploads/temp is immediately deleted... ???

Regards

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2228
Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
« Reply #127 on: March 04, 2017, 03:30:08 am »
:)

As for the cron cleaning, I wasn't aware of that.
Should that also work with auto-cron turned off using a serverside cron?

Asking because I noticed the load of files in my temp folder after having messing around with ads and images while testing whole system looking for PHP warnings/notices to get rid of.


Regards,
Eric

Even if not deleted (could be permissions/user issue), cron should take care of them in an hour or two, eventually.
« Last Edit: March 04, 2017, 03:56:08 am by SmaRTeY »

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 1536
  • osclass.work
Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
« Reply #128 on: March 04, 2017, 01:38:24 pm »
Yes, cron is cron, however triggered.

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2228
Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
« Reply #129 on: March 04, 2017, 07:44:59 pm »
Thanks dev, meaning even if bug in system it would not be flooded with left-over files.

With regard to cron I have other finding/question.
I have seen plugins that make use of the Osclass 'cron' hooks but found that these will *not* run if you have disabled the auto-cron in Admin and using a server cron for Osclass jobs. So in short, the Osclass cron created on server-side does run but somehow plugin that hooks into an Osclass cron is not triggered. Is this correct?

Yes, cron is cron, however triggered.

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 1536
  • osclass.work
Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
« Reply #130 on: March 05, 2017, 01:51:46 am »
Hi SmaRTeY,

I think I might found a "bug" in cleanup function, which, under certain conditions, might return "wrong" values. Do you still keep your rogue qq files on your server, if you do I'd like you to run some simple test? update: never mind, I have figured it out, will propose some changes to the cron file.

Sorry, just haven't much time lately, so I just "glide" through forum posts, obviously skipping messages:

Quote
With regard to cron I have other finding/question.
I have seen plugins that make use of the Osclass 'cron' hooks but found that these will *not* run if you have disabled the auto-cron in Admin and using a server cron for Osclass jobs. So in short, the Osclass cron created on server-side does run but somehow plugin that hooks into an Osclass cron is not triggered. Is this correct?

I have no idea, care to elaborate? I don't see how this can happen, cron mechanism is a simple hook system where functions are triggered, if they are properly "hooked" and still do not work, something else might be wrong with them (assuming you are sure cron ran (past tense) in the first place).
« Last Edit: March 05, 2017, 09:51:08 am by dev101 »

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2228
Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
« Reply #131 on: March 05, 2017, 12:43:11 pm »
Cool, something to benefit :)

Quote
I have no idea, care to elaborate? I don't see how this can happen, cron mechanism is a simple hook system where functions are triggered, if they are properly "hooked" and still do not work, something else might be wrong with them (assuming you are sure cron ran (past tense) in the first place).
Sure, I will have to dig in a little to be able to elaborate more but will do so. I 'solved' the issue in the mean time by taking it out of the cron-hook and use on of the hooks when someone visits the site.

Thanks

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 1536
  • osclass.work
Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
« Reply #132 on: March 05, 2017, 01:03:49 pm »
Quote
and use on of the hooks
:) ? (don't understand what you mean by this)

In any case, I always disable auto-cron on production servers, as I do not wish to collide or shift my custom/precise definitions in the server's crontab.

P.S.
here's the fix/finding of the "bug": https://github.com/osclass/Osclass/pull/2136

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2228
Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
« Reply #133 on: March 06, 2017, 01:36:55 am »
Thanks dev!

Quote
and use on of the hooks
Should be: and use onE of the hooks :)

Elaboration of cron-hook will follow a bit later, for now working on some other changes.