Does not delete advert images from server

Does not delete advert images from server was created by rsweb

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
7 years 4 months ago#1810

Please Log in or Create an account to join the conversation.

Replied by Super User on topic Does not delete advert images from server

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.
7 years 4 months ago#1812

Please Log in or Create an account to join the conversation.

Replied by Biking Zone on topic Does not delete advert images from server

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);}
7 years 4 months ago#1823

Please Log in or Create an account to join the conversation.

Replied by Biking Zone on topic Does not delete advert images from server

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 following user(s) said Thank You: Super User
7 years 4 months ago#1824

Please Log in or Create an account to join the conversation.

Replied by rsweb on topic Does not delete advert images from server

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
7 years 4 months ago#1829

Please Log in or Create an account to join the conversation.

Replied by Biking Zone on topic Does not delete advert images from server

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.

File Attachment:
7 years 4 months ago#1831

Please Log in or Create an account to join the conversation.

Time to create page: 0.187 seconds

Contact us

  No.2/A, Venkateshwara Nagar,
1st Main Road, 100 Feet Road, SBM Towers, Velachery,Chennai - 600 042,India.
 admin@jomclassifieds.com
 skype.jomclassifieds
Copyright © 2013-2021 Jomclassifieds.com. All rights reserved. The Joomla! name, and logo are used under a limited license granted in the United States and other countries.