Closed austriker27 closed 3 years ago
Is this a new thing, or has it always been doing this for you?
Is this a new thing, or has it always been doing this for you?
New-ish. Probably at least a week or two. Ill try to find when it started exactly.
Is this a new thing, or has it always been doing this for you?
New-ish. Probably at least a week or two. Ill try to find when it started exactly.
No problem, if you can that would help. Along with your composer installed versions :)
June 1st: It didnt happen https://github.com/RainierWatch/rainierwatch-v4/commit/cc3ff89c5af957b16cd3ac6f61ece24251574a20#diff-013d25bba71d03a2e755d1a71da1b9de36d43636b501c3aa186457f65290fe01
August 15th: It did happen https://github.com/RainierWatch/rainierwatch-v4/commit/a36f37e974b23cf1a717ab2ef462f2aa65ef3182
Composer version 2.0.9
- June 1st: It didnt happen RainierWatch/rainierwatch-v4@cc3ff89#diff-013d25bba71d03a2e755d1a71da1b9de36d43636b501c3aa186457f65290fe01
- August 15th: It did happen RainierWatch/rainierwatch-v4@a36f37e
- Composer version 2.0.9
Cheers, sorry - the composer installed versions. Did you update Statamic/What version of the plugins did you have at each time?
- June 1st: It didnt happen RainierWatch/rainierwatch-v4@cc3ff89#diff-013d25bba71d03a2e755d1a71da1b9de36d43636b501c3aa186457f65290fe01
- August 15th: It did happen RainierWatch/rainierwatch-v4@a36f37e
- Composer version 2.0.9
Cheers, sorry - the composer installed versions. Did you update Statamic/What version of the plugins did you have at each time?
Ha, oops - sorry my bad!
Here's what Ive got in my composer:
"php": "^7.3 || ^8.0",
"aerni/imagekit": "^2.2",
"andymnewhouse/radnight": "^1.0",
"doublethreedigital/blaze": "^1.0",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"jackabox/statamic-shopify": "^1.5",
"laravel/framework": "^8.0",
"laravel/tinker": "^2.0",
"league/flysystem-aws-s3-v3": "^1.0",
"league/flysystem-cached-adapter": "^1.1",
"mattrothenberg/statamic-mapbox-address": "^0.6.0",
"simonhamp/statamic-heroicons": "^1.0",
"spatie/browsershot": "^3.45",
"statamic/cms": "3.1.*"
Hey Jack, any suggestions or progress on this bug? Sorry to bug you but it's pretty annoying every time I import my products... I have 50+ items and Im going through them one by one and removing the timestamp URL bits.
Thanks!
Hey @austriker27, can you try installing the latest 1.x-dev branch changes and see if that fixes your issue?
Hey @austriker27, can you try installing the latest 1.x-dev branch changes and see if that fixes your issue?
Sorry I finally found some time to test this! And sadly the file appending is still happening.
composer require jackabox/statamic-shopify:dev-1.x-dev
FYI I used dev-
in front of your branch name based on this SO (I didnt know this so Erin from discord helped me)
thus "jackabox/statamic-shopify": "dev-1.x-dev",
https://stackoverflow.com/questions/33525885/composer-require-branch-name
@austriker27 Got it, this isn't a bug.
The reason this seems to be happening is as one is added to the "Featured image" and the same image is added to the "gallery". This is the same image/filename but it appends the date/time because of it.
I cannot replicate these changing the timestamps locally without having changed the images on the Shopify side.
Potentially, try deleting all of the media for your products and re-importing them.
@austriker27 Got it, this isn't a bug.
The reason this seems to be happening is as one is added to the "Featured image" and the same image is added to the "gallery". This is the same image/filename but it appends the date/time because of it.
I cannot replicate these changing the timestamps locally without having changed the images on the Shopify side.
Potentially, try deleting all of the media for your products and re-importing them.
But this even happens when an image is in the "gallery" and is not a "featured image". This happens for all my images, not just the featured image.
Ill test deleting the image for a product and reimporting because Im desperate for a fix because right now its a giant pain manually removing image URL suffixes whenever I import my products (and I import a lot of and have a lot of images)
EDIT: After further testing, I recant! It looks like it might be only happening for the feature image like you said! Hmmmm this is a pretty not great situation because every time I run an import of products (to update quantities) then I get duplicated images. Right now I've got probably a dozen duplicated images for my 50+ products... I wonder if there's a better way than using the timestamp to append a string on to the images.
Im still getting this and its causing me to spend hours each week removing duplicate image suffixes - any ideas on whats going on? Im not entirely convinced its not a bug.
Screenshot showing its more than just the featured image:
Hey @austriker27, it's on my radar. Can I get access to your code base so I can pull it down and clone it (if that's okay) and see if I can replicate as in my 3 test environments I can't get this to replicate.
Hey @austriker27, it's on my radar. Can I get access to your code base so I can pull it down and clone it (if that's okay) and see if I can replicate as in my 3 test environments I can't get this to replicate.
Thank you - I'd love your expert eyes on this.
I added you to my repo!
Hey @austriker27
The problem lies in your .env
file, you currently have a /
before the SHOPIFY_ASSET_PATH
, as so:
SHOPIFY_ASSET_PATH="/shopify"
where it should be:
SHOPIFY_ASSET_PATH="shopify"
This leads the plugin to not find the image and returns null, so reuploads it again. The timestamp is being added as it's trying not to overwrite the old one. If you remove the /
everything should work as expected.
My bad on this one, I need to ensure the docs are updated on this as these are missing.
Hey @austriker27
The problem lies in your
.env
file, you currently have a/
before theSHOPIFY_ASSET_PATH
, as so:SHOPIFY_ASSET_PATH="/shopify"
where it should be:
SHOPIFY_ASSET_PATH="shopify"
This leads the plugin to not find the image and returns null, so reuploads it again. The timestamp is being added as it's trying not to overwrite the old one. If you remove the
/
everything should work as expected.My bad on this one, I need to ensure the docs are updated on this as these are missing.
Oh gosh, I feel like I should have caught that too. Thanks so much for digging in! I can't wait to test this out!!
This just started at least a week ago? days ago, but basically looks the addon might have a bug that keeps adding a string of numbers to the end of product Image URLs. It happens every time I import which results in dozens of duplicate image files.
I updated to v1.5.2 but it still happens whenever I import an item. Erin in the discord said its probably a bug because it looks like a timestamp.
Diff screenshot:
Originally posted by @austriker27 in https://github.com/jackabox/statamic-shopify/discussions/85