Problem with Multiple Choices when I have an arithmetic value in the offered answers.

Respected,

when I try to create a question in the Multiple Choice type, and I have arithmetic values in the attempted answers, WordPress throws out a 404 error.
This only happens when I have an arithmetic value in the offered answers (for example 5 + 2 = 7)

Wordpress 5.7.2
H5P 1.15.2
Chrome Browser

Content types: 
otacke's picture

Hi glisapn!

Having arithmetic values as answer options is nothing that should cause trouble.

Could you please give the exact error message that you get? What file cannot be found?

Best,
Oliver

When I click on  submit content type, my site is redirect to admin.php?page=h5p_new and throw error 404. If I delete the arithmetic values from the offered answers, everything is saved nicely. I don't know where the problem is.

otacke's picture

Hi!

Interesting one. admin.php?page=h5p_new followed by some &id=xyz behind it should actually be the page that you are on when editing, and once you click on Create/Update you should be taken to admin.php?page=h5p&task=show&id=xyz.

Can't reproduce your problem here. Do you have means to check the server's PHP log?

Best,
Oliver

Yes, I have php logs.

 - [31/May/2021:17:33:22 +0200] "POST /komandna-tabla/admin-ajax.php?token=b559f80b33&action=h5p_library-upload HTTP/2.0" 200 93630 "https://my-domaiin.com/komandna-tabla/admin.php?page=h5p_new" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"

 - [31/May/2021:17:33:24 +0200] "POST /komandna-tabla/admin-ajax.php?token=b559f80b33&action=h5p_filter HTTP/2.0" 200 2072 "https://my-domaiin.com/komandna-tabla/admin.php?page=h5p_new" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"

 - [31/May/2021:17:33:25 +0200] "GET /komandna-tabla/admin-ajax.php?token=b559f80b33&action=h5p_libraries&machineName=H5P.MultiChoice&majorVersion=1&minorVersion=14&language=sr HTTP/2.0" 200 11215 "https:/my-domaiin.com/komandna-tabla/admin.php?page=h5p_new" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"

 - [31/May/2021:17:33:26 +0200] "POST /komandna-tabla/admin-ajax.php?token=b559f80b33&action=h5p_libraries HTTP/2.0" 200 398 "https://my-domaiin.com/komandna-tabla/admin.php?page=h5p_new" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"

 - [31/May/2021:17:33:26 +0200] "POST /komandna-tabla/admin-ajax.php?token=b559f80b33&action=h5p_libraries HTTP/2.0" 200 202 "https://my-domaiin.com/komandna-tabla/admin.php?page=h5p_new" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"

 - [31/May/2021:17:33:28 +0200] "POST /komandna-tabla/admin.php?page=h5p_new HTTP/2.0" 404 209047 "https://my-domaiin.com/komandna-tabla/admin.php?page=h5p_new" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"

otacke's picture

Hi!

That's the server log, but not the PHP error log.

Best,

Oliver 

No error was noticed by php logs.

When I save multiple choice, I get error 404 and redirect to "https://my-domaiin.com/komandna-tabla/admin.php?page=h5p_new".

otacke's picture

Interesting, because this seems to be a server-side problem - so I don't suppose you see anything in the browser's development console either. I have no clue what the cause for that behavior might be.

Best,
Oliver