GD creating multiple images each time on import of categories
This topic contains 12 replies, has 3 voices, and was last updated by Kiran 5 years ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
March 12, 2020 at 6:25 pm #535006
Hi,
Just working through the setup of GD and started with categories. We have about 20 parent categories and each has 0-12 subcategories. For now we want to use the same category default images for each of the subcategories as their parent. Same with the category icons. When we export the category info we see that GD has created separate files for each subcategory in both of those cases and also those “copied” files are in the uploads area. We don’t want to maintain thousands of those “copied” images; some day they might be unique but maybe never.
Also, each time we re-import the csv through the built-in import (not WP Import) it creates yet another batch of these “copied” files with new file names. Other fields don’t seem to duplicate on importing.
Also, after reading a couple other support posts here it appears we may run in to the same problem with listing images??
Is there a method that can be used to only have one copy of these in GD including after importing multiple times?
March 12, 2020 at 9:00 pm #535030For categories you can name a file in wp-content/uploads with a URL and it will not be imported. Try that and let us know.
Listing images are always imported, whether specified as a URL or a filename. We recommend that at least the first image is a URL so that it can be used to create thumbnails.
About listings, though, you don’t load the default image to the listing itself. Default listings images are one of the fallbacks:
https://wpgeodirectory.com/docs-v2/design/images/#fallback
https://wpgeodirectory.com/docs-v2/geodirectory/settings/import-export/#faq
If I missed part of your question please write back and clarify.
March 12, 2020 at 10:09 pm #535042Hi Alex,
I get the duplicating even when re-importing the exact file I export. It has the files referenced by wp-content/uploads URL already; isn’t that the format you are refering to? The URLs below were taken direct from the export file; the first entry is the parent category and the three below that are subcategories of that one; they were all set to the same URL and file name as the parent when we first started importing and exporting. We have done that round-trip 4 times now as we are trying to figure this out and as you can see the GD system keeps creating “copied” versions and making new files. The prior ones always remain in the uploads folder seemingly abandoned as they are no longer referenced in GD. It does not duplicate the parent image files though. We don’t want GD to enumerate these images as unique files for each subcategory; how do we stop that?
http://localhost/LMJ-temp/wordpress/wp-content/uploads/2020/03/Medical-Category-Default-Image.jpg
http://localhost/LMJ-temp/wordpress/wp-content/uploads/2020/03/Medical-Category-Default-Image-10.jpg
http://localhost/LMJ-temp/wordpress/wp-content/uploads/2020/03/Medical-Category-Default-Image-11.jpg
http://localhost/LMJ-temp/wordpress/wp-content/uploads/2020/03/Medical-Category-Default-Image-12.jpgMarch 12, 2020 at 11:24 pm #535055I will ask the developers to comment on your case.
March 13, 2020 at 4:14 am #535078Hello There,
Can you provide us .csv file that you are trying to import? Please attach .csv file in zip format.
Thanks,
KiranMarch 13, 2020 at 3:56 pm #535135This reply has been marked as private.March 14, 2020 at 11:25 pm #535233Thanks,
please also share WP Admin credentials so we can check out the issue on your site.
March 15, 2020 at 4:31 pm #535298This reply has been marked as private.March 16, 2020 at 12:13 pm #535406Hello!
The developers and I discussed the upload of the same image for the default image for multiple categories.
This is not possible through the importer – it will, by design, create an independant image for each category.
The main reason for this is that, if the image is deleted, it won’t disappear for more than one category at a time.
March 16, 2020 at 5:27 pm #535438Hi Alex,
OK, That process of the system creating an additional one for each subcategory is something that I could live with but why does it create new ones every time we do an import when the referenced file is already in the correct folder? Is there a method to stop creating new ones after the initial load if they haven’t changed?
March 16, 2020 at 8:06 pm #535465When you update, are you exporting first? Because if the unique image exists then it shouldn’t do that. For example if logo-2 is created, then logo-2 will be set for the image link. Are you using that? Or still trying to upload ‘logo’ again?
March 18, 2020 at 3:15 pm #535625Hi Alex,
I am exporting the file and then, with no edits, re-importing it again. The GD system creates new image files for all but the parent categories. I see the files in the normal GD folder along with all the other GD related listing images. Can you confirm when you try that test, on an install you have there, that you do not see the same duplication?
March 19, 2020 at 3:40 am #535675Hello lmj-temp,
I have done some more testing on my test site.
I have created two categories.
– Added a parent category named “Category A” & uploaded image “category-a.png” & icon “category-i-a.png”
– Added a child category named “Category A A” under “Category A” & uploaded image “category-a-a.png” & icon “category-i-a-a.png”
– Exported those categories in csv
– Re-imported csv
– It worked as expected. There is no new attachment entry created in database or in folder.Check csv file in attachment.
Let us know.
Regards,
Kiran -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket