Nardini: Degroff: delete all the existing media and run it fresh
Degroff: I delete it each time
Degroff: Lemme do it once more in case
Degroff: I think the problem is.
Degroff: Wp_generate_attachment_metadata is returning an empty array
Degroff: Maybe i can just hard code that
Degroff: If i can figure it out in like 15min i’m better off just manually doing it
Degroff: So upset right now grrrrr
Biase: Degroff: ok so. your GUID seems to be set as /uploads/filename.jpg
Teichman: Degroff: it should be uploads/carpet-whatever/
Larribeau: Degroff: i mean. it seems like your variables and stuff is all *****y. trying to track what you’re doing is kind of difficult
Degroff: Yeah i know sry about that
Pipkins: You have a variable called $filename but its really not a filename. its a full path to a file, is it not?
Degroff: Yeah but $filename in codex is a full path too
Mcghaney: Degroff: you realize the codex is editing by random people. The code isn’t always perfect
Musi: But either way. its a bad bad bad variable name
Villalovos: And makes it hard to follow what you’re doing
Kennell: Copy/pasting rarely works in your favor
Degroff: Again, i copied from codex bc Edwin i ha was working heh
Suvada: Degroff: even if you’re doing that you should rename the variables if they dont make sense
Degroff: I was at try 100 though
Spearin: So $filename should be $path_to_file or something
Degroff: I’m guessing i can just upload all to media dir and then pull each file by filename?
Degroff: B***-ackwards but i think that might work to get this temp data in there
Degroff: If i upload all the images to media library directly, i can then just run the script to locate the ID of the attachment by searching for the filename in the database
Degroff: Idk how i loaded 1/2 of the images just fine and then lost my script andn ow *****ed haha
Degroff: I’m probably frustrating you. : i have to prob come back to it and make it work. i’ve done this MANY times so idk wth
Marse: Do whatever you want. This is just too much to try to debug from here remotely with just the info you give me
Degroff: I haven’t been the greatest explainer lmao. so frustrated w/ it
Degroff: I could tweak it and put in full paths instead of vars
Degroff: Just for sake of sanity
Polland: You should walk away from it. rework your code so it makes sense
Degroff: Yeah i’m gonna have to for the production products
Benesh: Stop “tweaking” and write your code out
Degroff: Yeah i planned on doing that and kicked myself when i deleted the dang file
Degroff: A sloppy moment. was prepared to load anything that i was given haha
Degroff: But i just figured out how to easily find the attachment id by image URL, which all images are gonna be in this month’s upload folder
Mccollester: Degroff: you should REALLY be kicking yourself not for deleting the file, but for not versioning your work or backing it up minimally
Degroff: So i at least can write a quick script to load them now
Degroff: LindsayMac, yeah i frequently write quick scripts to manipulate stuff then trash it bc 99% of the time it’s irrelevant after that moment
Degroff: This time i knew i needed to be careful but i was just in a hurry and needed to load products 😛 no excuse but oh well
Cappelluti: Degroff: again. thats the almost LITERAL purpose of version control
Degroff: I knew what i was risking when i did it and lo and behold!
Stolts: Then you have no risk. version control version control version control
Degroff: Uhh. a one time script that i’ll never use again? version control?