After wordpress upgrade to 4.2.2 version. I get the message Invalid argument supplied for foreach() in /h5p/h5p-php-library/h5p.classes.php on line 1558. How to solve?
Tue, 05/12/2015 - 13:23
That is strange. Can you please check your web server's error_log for futher details?Also please double check that the wp-content/upload/h5p/temp folder is writable by the web server.
Tue, 05/12/2015 - 23:56
Yes it is writable. Info from error log a lot of lines with entry: File does not exist /public_html/404.shtml
Tue, 05/12/2015 - 23:57
Can it be the bug? As this message is shown on content types
Wed, 05/13/2015 - 09:29
No, I think that is another issue with you web server's setup. It seems like you're missing a custom 404 page.
Wed, 05/13/2015 - 09:49
Did you just update WordPress, or did you also update the H5P module?
Wed, 05/13/2015 - 10:04
Please try and check if there are any files or folders in wp-content/uploads/h5p/temp/
Also if you could add this line of code before line 1558 in wp-content/plugins/h5p/h5p-php-library/h5p.classes.php:print $dir . ' - ' . count(glob($dir . '/*')) . '<br/>';
After that you try to save the H5P content again and copy the text output to this forum post.
What kind of web host are you using?
Tue, 05/19/2015 - 14:51
Here is text output:
public_html/wp-content/uploads/h5p/temp/3 - 6public_html/wp-content/uploads/h5p/temp/3/FontAwesome - 6public_html/wp-content/uploads/h5p/temp/3/H5P.Dialogcards - 6public_html/wp-content/uploads/h5p/temp/3/H5P.Dialogcards/css - 1public_html/wp-content/uploads/h5p/temp/3/H5P.Dialogcards/js - 1public_html/wp-content/uploads/h5p/temp/3/H5P.Dialogcards/language - 4public_html/wp-content/uploads/h5p/temp/3/H5P.JoubelUI - 5public_html/wp-content/uploads/h5p/temp/3/H5P.JoubelUI/css - 9public_html/wp-content/uploads/h5p/temp/3/H5P.JoubelUI/css/joubel-grep-dialog-box - 1public_html/wp-content/uploads/h5p/temp/3/H5P.JoubelUI/fonts - 4public_html/wp-content/uploads/h5p/temp/3/H5P.JoubelUI/js - 10public_html/wp-content/uploads/h5p/temp/3/H5P.JoubelUI/js/joubel-grep-dialog-box - 2public_html/wp-content/uploads/h5p/temp/3/H5PEditor.VerticalTabs - 4public_html/wp-content/uploads/h5p/temp/3/content - 5public_html/wp-content/uploads/h5p/temp/3/content/audios - 1
Should I delete TEMP folder? or change the rights?
Wed, 05/20/2015 - 08:38
That is strange. Everything looks like it should.Yes, you could try deleting the temp folder and see if you get any new error messages. The folder should be recreated automatically.
Tue, 05/19/2015 - 16:51
I have the latest version of wordpress and when I install the pluggin the following error appear and then the plugin is not working correctly:
The plugin generated 584 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.
Is anything wrong?
Wed, 05/20/2015 - 08:36
Hi! This isn't normal. To find out what is wrong we need to know what the "unexpected output" is. Could you please check your web server's error log for futher details?
Wed, 05/20/2015 - 10:23
I also get a message about characters of unexpected output (I think mine was more than 584 but I didn't copy the message so I don't know) and the plugin isn't working at all. I can create content but when I click "view" I see nothing at all.
I have Wordpress 4.2.2 hosted on WP engine.
Wed, 05/20/2015 - 10:28
Uninstalled it and reinstalled it, this is the message I get: "The plugin generated 1014 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin."
Wed, 05/20/2015 - 10:38
I'll do so more testing and see if i can reproduce the error.
Could you please try to check your error log? Instructions for WP Engine: http://wpengine.com/support/how-do-i-access-the-phpapache-error-log-for-my-account/
Wed, 05/20/2015 - 09:05
This is happening when I install the official pluggin 1.5 in wordpress (latest version 4.2.2) in my server. Then when I try to create content I am getting different errors:
In "my results" section: "TypeError: self.table is undefined" (with Firebug)
When I create a new Content:
Wed, 05/20/2015 - 09:37
The plugin will most likely not work properly if you get error messages upon activation. What web hosting are you using? You should be able to access a file called error_log, which will describe the error encountered upon activating the plugin. If you're hosting this your self the file should be located at /var/log/apache/error_log or something similar.
Enabling define('WP_DEBUG', true); in wp-config.php might print the errors to your browser when you activate the H5P plugin.
Please note that this plugin does work for others so it's most likely something related to your web setup. Either way we'll be happy to help, and hopefully we can make H5P easier to use for everyone.
Wed, 05/20/2015 - 10:37
I found my error log (attached) but I have no idea what it means. It does have a lot of "Permission denied" messages and a search for h5p gets over 1000 results. So it looks like something went wrong during installation, and while I was using the plug-in.
Would be great if you could take a look and see what the problem is. If it's with my host I can contact them.
Wed, 05/20/2015 - 11:08
Thank you so much. It seems like there's an issue with too big keys in the database. I guess WP Engine has reduced their max size below the standard option. We have created a fix for this issue by reducing our key sizes so that the plugin should work. Do you think you could test the changes before we release a new version of the plugin?
In order to test you'll have to delete the H5P plugin and then download it again, but before you activate the newly downloaded plugin you'll have to replace a file named "class-h5p-plugin.php" in the "public" folder. An updated version of the file can be found here. To download it you'll have to right click the button label "raw" and then choose "Save link as...". When the file has been replaced with the new one you should be able to active and use the plugin.
If this works the fix will be a part of the next plugin version, and hopefully it will help many more.
Wed, 05/20/2015 - 13:11
Thank you for helping me with this. That fix sounds awesome and if I can only figure out where to put it I would be happy to test it. Do you know how I can get to the public folder on WP Engine or the Wordpress menu? I have tried googling but can't find anything.
Wed, 05/20/2015 - 13:12
Nevermind, as soon as I sent that I found it!
Wed, 05/20/2015 - 13:27
Tested it and it runs perfectly now. Thank you so much for the quick help!
Wed, 05/20/2015 - 13:31
Good, I'm glad to help.
I'll make sure this fix becomes a part of the upcoming release.
Connect with H5P
H5P is a registered trademark of Joubel