VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: MAD King on September 17, 2022, 00:17:58 AM

Title: Old Path/Url in Database [solved]
Post by: MAD King on September 17, 2022, 00:17:58 AM
I have the URL for images set to

images/virtuemart/

right after installation years ago and I just noticed that there are many, many URLs with

images/stories/virtuemart/

still in the database.

Is there a way to remove these?
Title: Re: Old Path/Url in Database
Post by: Darko F. on September 17, 2022, 10:59:09 AM
Hi
/stories/virtuemart/ is usualy conected with RO CSVI component
You can safely remove this folder via FTP, if you know what you doing and VirtueMart don't use it any more.

If your VirtueMart still using these folder and you vremove it you will have trouble.

Hope this help.
Title: Re: Old Path/Url in Database
Post by: MAD King on September 17, 2022, 14:14:11 PM
Quote from: Darko F. on September 17, 2022, 10:59:09 AM
Hi
/stories/virtuemart/ is usualy conected with RO CSVI component
You can safely remove this folder via FTP, if you know what you doing and VirtueMart don't use it any more.

If your VirtueMart still using these folder and you vremove it you will have trouble.

I am not sure if you read my post.
Hope this help.

Title: Re: Old Path/Url in Database
Post by: Darko F. on September 17, 2022, 22:40:59 PM
Hi
Sorry I try just to point you one possible way where this your link in database came from.

Didn't know i need to give a complete instruction how to delete links from your database

Ok here it is the way to remove these:

In some database editor like PHPMyadmin

Go there and checkbox next to your databases, best for you to check select all checkbox.

Then find button where you can select what to do and select - empty or truncate checked  databases.

And here you go, you will delete your  links and all of the rest of your troubles will also gone.

Hope this helps.

Title: Re: Old Path/Url in Database
Post by: Jörgen on September 23, 2022, 06:33:54 AM
Quote from: MAD King on September 17, 2022, 00:17:58 AM
I have the URL for images set to

images/virtuemart/

right after installation years ago and I just noticed that there are many, many URLs with

images/stories/virtuemart/

still in the database.

Is there a way to remove these?

Are the url's really orphaned? If not then you have to change them instead. Regular lab has this component
https://regularlabs.com/dbreplacer (https://regularlabs.com/dbreplacer)
that makes replacement a breeze.

Jörgen @ Kreativ Fotografi
Title: Re: Old Path/Url in Database
Post by: MAD King on September 23, 2022, 14:11:03 PM
Quote from: Jörgen on September 23, 2022, 06:33:54 AM
Quote from: MAD King on September 17, 2022, 00:17:58 AM
I have the URL for images set to

images/virtuemart/

right after installation years ago and I just noticed that there are many, many URLs with

images/stories/virtuemart/

still in the database.

Is there a way to remove these?

Are the url's really orphaned? If not then you have to change them instead. Regular lab has this component
https://regularlabs.com/dbreplacer (https://regularlabs.com/dbreplacer)
that makes replacement a breeze.

Jörgen @ Kreativ Fotografi

Hi Jörgen,

yes, they are orphaned.
Title: Re: Old Path/Url in Database
Post by: Jörgen on September 23, 2022, 14:30:28 PM
Then take a backup of the database.
Delete the unwanted entries and see what happens.

Jörgen
Title: Re: Old Path/Url in Database
Post by: MAD King on September 23, 2022, 14:59:36 PM
Quote from: Jörgen on September 23, 2022, 14:30:28 PM
Then take a backup of the database.
Delete the unwanted entries and see what happens.

Jörgen

I know. I just thought there would be a function to have the DB cleaned automatically.
Title: Re: Old Path/Url in Database
Post by: Jörgen on September 23, 2022, 15:10:39 PM
Only Max knows the relations between the tables. If he hasn't thought of such a tool, the database can not know what is obsolete info.
Jörgen
Title: Re: Old Path/Url in Database
Post by: MAD King on September 23, 2022, 15:14:23 PM
Quote from: Jörgen on September 23, 2022, 15:10:39 PM
Only Max knows the relations between the tables. If he hasn't thought of such a tool, the database can not know what is obsolete info.
Jörgen

Good one!! lol
Title: Re: Old Path/Url in Database
Post by: Milbo on October 05, 2022, 23:50:24 PM
I could write one. :-) There is actually a function already for the stories folder "getStoriesFB". But that wont work here.

A simple function would be to remove the "stories" from the url. A better function checks any image in the stories folders,.. if it is not available in the normal folder than it is moved and the url updated. If there are two images, take a hash, if it is the same, delete the stories image. If you have 2 different images, show a warning.

100 Bugs and you are onboard. https://extensions.virtuemart.net/support/virtuemart-supporter-membership-silver-detail
Title: Re: Old Path/Url in Database
Post by: MAD King on October 06, 2022, 00:05:14 AM
I removed it by selecting "Missing" and "Orphaned Media" in the Media Managed. Worked perfectly.
Title: Re: Old Path/Url in Database [solved]
Post by: Milbo on October 13, 2022, 00:16:21 AM
Nice to  hear :-)