backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 40 forks source link

PHP 8.0: all modals fail to open, actions still complete, but no errors in the logs. #5584

Open jenlampton opened 2 years ago

jenlampton commented 2 years ago

Description of the bug

This past week a hosting company decided to update one of my backdrop sites to PHP 8. After the update, modals stopped opening. (I tested those on the layouts UI, and those in the views UI). There were some PHP-8 related errors in the logs that I addressed (mostly wanrings), but even after all warnings were resolved, the modals failed to open.

When you click on the "Configure" link for a block, for example, the first thing you see is the circular spinner. Then the spinner stops, without the modal opening. I also tried the "Remove" button, it had the same behavior.

After I decided that I wasn't going to be able to figure out what was wrong in a reasonable amount of time, I switched back to PHP 7.4, where everything returned to working as expected.

After returning to PHP 7.4, I noticed that the block was successfully deleted from the layout. It's as though the ajax command did what it was supposed to, but without any visual confirmation about the change.

I'm thinking maybe PHP 8 was missing some of the required PHP modules? The status report didn't have any errors though. I'd love some advice on what I should test next.

Steps To Reproduce

To reproduce the behavior:

  1. Install Backdrop on BlueHost
  2. Update your site to use PHP 8.0 by adding the following into .htaccess:
    # php -- BEGIN cPanel-generated handler, do not edit
    # Set the “ea-php80” package as the default “PHP” programming language.
    <IfModule mime_module>
    AddHandler application/x-httpd-ea-php80 .php .php8 .phtml
    </IfModule>
    # php -- END cPanel-generated handler, do not edit
  3. In Backdrop, attempt to configure a custom block

Actual behavior

The circular spinner appears after clicking on the button. Then the spinner stops, without the modal opening.

Expected behavior

Modals should open

Additional information

Add any other information that could help, such as:

danieljrmay commented 2 years ago

Hi @jenlampton, I've no idea what is wrong with your installation on BlueHost, but I can provide another PHP 8.0 data point which I hope might be helpful.

My modal "windows" are working in both the Layouts UI and Views UI while running Backdrop 1.21.4 on a Fedora 35 based container with /admin/reports/status showing:

PHPInfo at admin/reports/status/php shows configuration sections for: bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, json, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, Reflection, session, SimpleXML, sockets, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zip, zlib.

I am using php-fpm and viewing the site in Firefox.

If it is a missing PHP module hopefully you can narrow your search by cross checking with the above?

indigoxela commented 2 years ago

@jenlampton I can't reproduce the problem, either.

PHP modules: ast calendar Core ctype curl date dom exif FFI fileinfo filter ftp gd gettext hash iconv intl json libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql Phar posix readline Reflection session shmop SimpleXML sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache

Modals work fine.

Is there anything in the browser console - errors or warnings?