Welcome, Guest
Username: Password: Remember me

TOPIC: Does not delete advert images from server

Does not delete advert images from server 2 years 9 months ago #1810

Hi,

Bit of an urgent request, I have found that if a user deletes their uploaded advert images, they actually do not get deleted from the server, leaving a massive backlog of images.

Please can you push a fix on this.

Best regards
The administrator has disabled public write access.

Does not delete advert images from server 2 years 9 months ago #1812

  • Super User
  • Super User's Avatar
  • Offline
  • Administrator
  • Posts: 2760
  • Thank you received: 292
  • Karma: 40
Hi,

Thanks for your valuable suggestion and sure i will pass this to our product management team. They will fix this in our future version.

Thanks.
The administrator has disabled public write access.

Does not delete advert images from server 2 years 9 months ago #1823

  • Biking Zone
  • Biking Zone's Avatar
  • Offline
  • Junior Boarder
  • Posts: 22
  • Thank you received: 2
  • Karma: 0
Here is the soluton:
File: /administrator\components/com_jomclassifieds/models/adverts.php line:348
From:
if(JFile::exists($delDir)) {
   JFile::delete($delDir);
}
To:
if(JFolder::exists($delDir)) {
   JFolder::delete($delDir);
}
The administrator has disabled public write access.

Does not delete advert images from server 2 years 9 months ago #1824

  • Biking Zone
  • Biking Zone's Avatar
  • Offline
  • Junior Boarder
  • Posts: 22
  • Thank you received: 2
  • Karma: 0
Sorry my previous post was for the Administrator section (Backend).
The following is for the Site (Frontend):

File: /components/com_jomclassifieds/models/user.php line:341
From:
if(JFile::exists($delDir)) {
	JFile::delete($delDir);
}
To:
if(JFolder::exists($delDir)) {
	JFolder::delete($delDir);
}
The administrator has disabled public write access.
The following user(s) said Thank You: Super User

Does not delete advert images from server 2 years 9 months ago #1829

HI,

Thanks for posting, tested in > administrator, but I can still see the images in:
/public_html/media/com_jomclassifieds/adverts/1/

I also found:
if(JFile::exists($delDir)) {
JFile::delete($delDir);
}

on line: 695 in /administrator/components/com_jomclassifieds/models/adverts.php

I am using jomclassifieds_2.2.0
The administrator has disabled public write access.

Does not delete advert images from server 2 years 9 months ago #1831

  • Biking Zone
  • Biking Zone's Avatar
  • Offline
  • Junior Boarder
  • Posts: 22
  • Thank you received: 2
  • Karma: 0
We may be looking at different files. My instance of /administrator/components/com_jomclassifieds/models/adverts.php only has 430 lines.

You might be looking at the wrong ID column when you delete the advert. Please see attached image with the proper ID column.

The administrator has disabled public write access.
Time to create page: 0.350 seconds