-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Video Pack Fatal Issue: Warning: Invalid argument supplied for foreach #519
Comments
Somehow your video encode queue has a value in it that's not empty and not an array. I'll have to do some digging to figure out how that could happen. But in the meantime I'll add a check to make sure it's an array before starting the foreach loop. I'll try to get an update out soon. |
Much appreciated. If you need access to the installation please let me know. Any idea when you'd planned to release the next version? I do appreciate your work Kyle. You have a very mature product. Hopefully you won't have to deal with bugs soon. |
Ha! There will always be more bugs. I just put out an update that I hope will solve this bug though. |
Bug seems to be back. Am now getting.
|
I made more thorough checks to avoid that error, but I'd love to know what the string is in your encode queue. Are you able to look in your database to see what the 'kgvid_video_embed_queue' entry is in the wp_options table? |
**deleted for security**
|
I couldn't post all of it. I'm not sure its been working at all. |
It's a good idea to avoid posting your full server path publicly. I deleted the data, but it was the beginning of what looked like a normal serially encoded array. |
I'll be happy to do that for you. Is there no scalable way to handle large
queue? I actually don't have that many videos uploaded so i'm a little
confused. I think that wpcron isn't running however.
--
Mike McKoy
770-203-8805
…On Fri, Mar 10, 2023 at 9:33 AM Kyle Gilman ***@***.***> wrote:
It's a good idea to avoid posting your full server path publicly. I
deleted the data, but it was the beginning of what looked like a normal
serially encoded array.
Without the whole array I can't tell what's causing the problem, but it's
possible your queue is so big that it's running out of room to save the
whole thing and so when it's read, it can't be unserialized and turned into
an array. Can you try pasting the whole thing here?
https://www.unserialize.com/ See if that gives you an error.
—
Reply to this email directly, view it on GitHub
<#519 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A456OINBFR2EXV4NEZOSFQDW3M3TXANCNFSM6AAAAAAU4KREXE>
.
You are receiving this because you modified the open/close state.Message
ID: <kylegilman/video-embed-thumbnail-generator/issues/519/1463889593@
github.com>
|
Also here's a screen capture of some weird characters now appearing on the
pages. I went ahead and disabled the plugin to protect SEO
…On Fri, Mar 10, 2023 at 10:25 AM Mike McKoy ***@***.***> wrote:
I'll be happy to do that for you. Is there no scalable way to handle large
queue? I actually don't have that many videos uploaded so i'm a little
confused. I think that wpcron isn't running however.
--
Mike McKoy
770-203-8805
On Fri, Mar 10, 2023 at 9:33 AM Kyle Gilman ***@***.***>
wrote:
> It's a good idea to avoid posting your full server path publicly. I
> deleted the data, but it was the beginning of what looked like a normal
> serially encoded array.
> Without the whole array I can't tell what's causing the problem, but it's
> possible your queue is so big that it's running out of room to save the
> whole thing and so when it's read, it can't be unserialized and turned into
> an array. Can you try pasting the whole thing here?
> https://www.unserialize.com/ See if that gives you an error.
>
> —
> Reply to this email directly, view it on GitHub
> <#519 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/A456OINBFR2EXV4NEZOSFQDW3M3TXANCNFSM6AAAAAAU4KREXE>
> .
> You are receiving this because you modified the open/close state.Message
> ID: <kylegilman/video-embed-thumbnail-generator/issues/519/1463889593@
> github.com>
>
|
[image: image.png]
--
Mike McKoy
770-203-8805
…On Fri, Mar 10, 2023 at 10:26 AM Mike McKoy ***@***.***> wrote:
Also here's a screen capture of some weird characters now appearing on the
pages. I went ahead and disabled the plugin to protect SEO
On Fri, Mar 10, 2023 at 10:25 AM Mike McKoy ***@***.***> wrote:
> I'll be happy to do that for you. Is there no scalable way to handle
> large queue? I actually don't have that many videos uploaded so i'm a
> little confused. I think that wpcron isn't running however.
> --
> Mike McKoy
> 770-203-8805
>
>
> On Fri, Mar 10, 2023 at 9:33 AM Kyle Gilman ***@***.***>
> wrote:
>
>> It's a good idea to avoid posting your full server path publicly. I
>> deleted the data, but it was the beginning of what looked like a normal
>> serially encoded array.
>> Without the whole array I can't tell what's causing the problem, but
>> it's possible your queue is so big that it's running out of room to save
>> the whole thing and so when it's read, it can't be unserialized and turned
>> into an array. Can you try pasting the whole thing here?
>> https://www.unserialize.com/ See if that gives you an error.
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <#519 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/A456OINBFR2EXV4NEZOSFQDW3M3TXANCNFSM6AAAAAAU4KREXE>
>> .
>> You are receiving this because you modified the open/close state.Message
>> ID: <kylegilman/video-embed-thumbnail-generator/issues/519/1463889593@
>> github.com>
>>
>
|
Okay so i found the conflict showing weird characters was unrelated. However i'm still getting these errors and the queue shows empty in wordpress while its full in the datbaase. Warning: foreach() argument must be of type array|object, string given in /wp-content/plugins/video-embed-thumbnail-generator/src/admin/videopack-ffmpeg.php on line 1590 Not sure I can use the plugin or that its ever been functioning. |
Did you try doing the unserialize on the full database entry? I don't know for sure what's causing your problem. I have heard that extremely large queues sometimes cause errors because of the way WordPress saves options, and since you weren't able to paste the whole queue I thought that might be it. If wp-cron isn't working I would try to get it working. The problem could be related to whatever's stopping Videopack from working. WP Control is a good place to start when troubleshooting wp-cron. |
Okay wp cron appears to be fixed. However I still get this error: Warning: foreach() argument must be of type array|object, string given in /*****/public_html/wp-content/plugins/video-embed-thumbnail-generator/src/admin/videopack-ffmpeg.php on line 1590 |
Next step, try deleting the whole kgvid_video_embed_queue database entry in wp_options just to clear out all the junk. |
Alrighty so I cleared it out. We'll see if this works. I'll try to encode another video. Also the error has disappeared after I cleared the entries in the database as suggested. I didn't delete. Just cleared the field. |
Okay so I tried adding a video to the encoding queue and found no record of it in the database or the wordpress queue. As far as I can see the plugin hasn't worked in my environment since Dec 2022. That's when the last video uploaded was encoded into different formats. Not seeing any errors since the db table is cleared. Should I delete the kgvid_video_embed_queue entry altogether? |
I created a test staging site if you want to take a look. |
Hey Kyle? Still on deck? I do need help still. Please. |
You could try deleting the kgvid_video_embed_queue entry. It shouldn't make anything worse. |
Hey Kyle, I did try and was able to encode some videos but I get a lot of errors.
|
Hi Kyle, I know you're busy. Just wanted to follow up with you. |
Sorry @mykkal, I'm totally stumped. |
Problem disappeared. Not sure what caused it. I think it may have been the theme Tattoo by Vamtam |
My apologies. I tried emailing you about this. I found the issue but cannot fix it myself.
I'm getting errors returned from videopack that cause the site to crash from time to time. The video queue stays empty and no videos are converted.
The error is:
Warning: Invalid argument supplied for foreach() in /****/****/public_html/wp-content/plugins/video-embed-thumbnail-generator/src/admin/videopack-ffmpeg.php on line 2528
I found an article that explains a fix for this issue: educative.io/answers/fixing-the-invalid-argument-supplied-for-foreach-php-error
Would really appreciate the help or work around if you have one.
This is affecting https://ironpalmtattoos.com
The text was updated successfully, but these errors were encountered: