Drupal 8 file upload issue
When attempting to create new content that uses an H5P element, on "save" I get this error:
This value should not be null.
and the file upload input is highlighted in red. The file was uploaded and unzipped to the sites/files/h5p/temp directory, where it was placed in an h5p-[13-digit-alphanumeric] directory before the process ABENDed.
On page refresh (F5), after the form resubmits these error messages are finally exposed:
The file could not be saved because the upload did not complete. File upload error. Could not move uploaded file. The uploaded file doesn't have the required '.h5p' extension
upload_max_filesize and post_max_size were both reset to 128M, to no effect. The two packages listed below, when unzipped to the temp directory, are 2.7M and 2.8M respectively.
Drupal v8.5.4
modules:
H5P v8.x-1.0-rc7 (enabled)
H5P Editor v8.x-1.0-rc7 (enabled)
H5P packages:
multiple-choice-713.h5p
true-false-question-34806.h5p
Firefox, latest version, desktop, no console errors. Mostly ditto with Google Chrome, latest version (no additional errors on refresh)
No PHP errors to the apache2 error.log file (which PHP logs to) or displayed on screen (xdebug is installed)
Nothing meaningful in Watchdog (says Notice:The file public://h5p/temp/h5p-5b35127dd907e/multiple-choice-713.h5p was not deleted because it does not exist.)
No config or other issues reported under Reports > Status Report (file system is writable)
I am running Drupal on Ubuntu 18.04, with Ubuntu as a Guest VM under VirtualBox v5.2.12, with Windows 10 as Host. vbox extensions and guest additions are installed.
I am logged into drupal as user 1 (root)
This looks like a really nasty bug, but where exactly? Or am I doing something wrong even though I followed the instructions at https://h5p.org/documentation/setup/drupal8 ?
icc
Mon, 07/02/2018 - 11:32
Permalink
Try changing the field form
Try changing the field form widget to H5P Editor and try the upload feature in the Hub.
rjh427
Tue, 07/10/2018 - 00:32
Permalink
...hmm
The instructions at https://www.drupal.org/project/h5p were a bit more clear:
That said, my domain is "drupal.test", it's homed in my /www/drupal/ directory because I'm doing dev work in a local environment. I'm getting this nonsense:
There is no SSL cert so that's likely the reason fopen() SSL failed with code 1. If I create a snakeoil cert, that brings its own issues, done it before and hoped it wouldn't be needed here. Is there a workaround that doesn't involve snakeoil SSL certs?
rjh427
Tue, 07/10/2018 - 14:50
Permalink
SSL?
Is the lack of an SSL cert for the dummy domain what is causing the !@#$ error if I attempt to upload an archive file that was downloaded from H5P.org? Because there needs to be a much better error messaging if that is the case.
icc
Tue, 07/10/2018 - 16:05
Permalink
It looks like your server
It looks like your server/environment isn't able to verify the certificate of h5p.org. I guess this could be caused by a number of things, the host machine of the VM manipulating the request in some manner, the issuer not being trusted or something simple like the system clock not being correct.
rjh427
Tue, 07/10/2018 - 16:15
Permalink
SSL status checks needed
So, I should check to verify SSL is enabled under Apache, even if I don't create a snakeoil cert?
I'll look into that, that functionality should be present and enabled whether I create a self-signed cert or not.
I'll report back, once I get back to that (might take a few hours).
rjh427
Tue, 07/10/2018 - 16:28
Permalink
Hit the wrong "reply" button,
Hit the wrong "reply" button, now can't delete the other comment/reply and reply here - please see reply below.
rjh427
Tue, 07/10/2018 - 16:27
Permalink
mod_ssl for apache
So openssl was enabled under PHP, but mod_ssl was not enabled under apache2. I enabled it. Will proceed with a new round of testing, presently.