Category: WordPress

  • WordPress Function add_theme_support( ‘html5’ ) was called incorrectly

    An annoying message appeared yesterday when we migrated a customer website to a new server.

    Notice: Function add_theme_support( ‘html5’ ) was called incorrectly. You need to pass an array of types.

    The site is an older build but seemed to be working in every other respect. So a quick dive into the WordPress documentation for add_theme_support() confirmed that the old theme was using an old format of the add_theme_support function. Checking within the theme files identified the offending line and offered a quick fix.

    // Add HTML5 markup structure
    // 20230417 thowden : this format is incorrect. 
    //add_theme_support( 'html5' );
    // it should call with an array like this:
    add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption', 'style', 'script' ) );
    // end thowden

    The above modification was made and the site runs smoothly again. The actual details of the theme and the specific file are not relevant as this could affect any older WordPress theme install.

  • WordPress wp-admin missing gui

    When moving WordPress sites around on servers and from a staging setup to live, we sometimes get bitten with “wordpress wp-admin missing gui” where the public view of the site is working fine, but the wp-admin areas shows up as plain text or simple html. You may not have seen it before, but plain white background and all the dashboard selections are simple links, like the theme is missing.

    Having gone through this several times in the last 4 or 5 weeks, I have decided I need to document what I tried and what worked in the end for the latest site issue. It could be different things and while I did not make a note the last few times, I’ll come back here in future if something different happens.

    We use CPanel for all our hosting servers and the WordPress Toolkit is installed.

    The task was a simple swap from staging to live which I do on a regular basis, and do it manually, as I have done for numerous years. However this time the dreaded “wordpress wp-admin missing gui” struck!

    Skipping the intervening hour of trying a multitude of settings, I discovered that this site was impacted by one of the WordPress Toolkit security settings. Which one, I do not know, as the final outcome was to revert or reset all the security settings and then enable 1 by 1 waiting to see which one failed, and none did!. Bah humbug.

    The outcome is then likely that somewhere in those settings, as I had copied the site manually into the public_html, had some setting that tied it back to the staging location, and ultimately crashed the theme. I expect that clearing the security settings (Revert) and re-enabling in one hit would have addressed the issue, but as with many things, we try incremental changes. If it happens again, I will try that first.

  • WordPress Another update is currently in progress

    Do you see in WordPress “Another update is currently in progress.” when you try to update the WordPress core? If so then you have probably checked all the other sites that advise you to delete a database entry, or use a plugin, or even use the wp-cli command to delete the database entry. In my recent research to resolve this, none of the sites I found actually provided any solution if that database entry does not exist.

    I did end up with a post at WordPress.org: update-wordpress-another-update-is-currently-in-progress-2 and noted that even there the suggested solution was “wp option delete core_updater.lock” which was redundant advice as the original poster of the issue had already stated that the database table (wp_options) did not include that record.

    In order to confirm this, I did install the wp command line utility from https://wp-cli.org/ and ran a couple of commands to check the current option for core_updater.lock, but as evidenced the wp-cli cannot find it either.

    wp option get core_updater.lock
    Error: Could not get 'core_updater.lock' option. Does it exist?

    At this point the short answer is that the wp_options table does not have the record to delete regardless of using a plugin, php-myadmin, or wp-cli. If it ain’t there it cannot be deleted, and yet we still have the issue of “Another update is currently in progress.”

    At this point I am still looking for a solution ( while it would be good to identify the issue, but a work-around will suffice) and have been testing or confirmed:

    • Specific to a site with 5.8.1 installed (I do not think this matters)
    • Trying to update to 5.9.3 (again I do not think it is a version issue)
    • Checked other WP sites on the same server – all ok – says that it is not a server config issue (i.e. its isolated to the site)
    • Ran all other updates for this site – plugins, themes etc. no issue. Only the core update fails / errors.
    • Tested swap of PHP (Multi-PHP Manager) version just to see if something triggered a clean-up – no change
    • Checked back on the dev site for the same live site and the dev site had automagically been updated to 5.9.3 obviously without an issue. Which comes down to some error within the live site only.
    • Finally drilled into a browser Inspect Console and discovered there were 403 errors on some scripts, like the wp-admin/loadstyles.php.

    A 403 Error Forbidden suggested it was htaccess or virtualhost related and probably not an issue with WordPress itself. I then confirmed file level permissions with default chmod and ownership with chown checked and re-applied just in case, but that made no difference.

    The end result was the Cpanel / WHM server the WordPress Toolkit was enabled for both the live and the dev sites. The two sites appeared to be configured identically but a cycle through each of the settings for security, disabling and re-enabling cleared the live site of whatever glitch / corruption was present.

    Summary: If you cannot find the core_updater.lock record then the error message is a fall-back error, or a red-herring to use an old-school term, and not accurate. What it is saying is “WordPress wants to run the update but something weird is happening and WordPress cannot write or read what it needs.”

    If I had this time over I would check in this order rather than what I did which was circuitous at best.

    1. WordPress Error “Another update is currently in progress” but no core_updater.lock
    2. Check in browser console (Inspect) to see if anything is giving errors

    WrenMaxwell provides fully managed hosting services for WordPress websites, business email, and domain names.

  • WordPress Booking Plugins

    We had a need to review WordPress Booking Plugins and we selected WP Booking Calendar.

    In the process we noted the following other plugins and made some quick notes on why they were rejected.

    In Alphabetical order the plugins we briefly tested were:

    Advanced Booking Calendar v1.5.4 https://booking-calendar-plugin.com/

    Appears ok, but needs some setting changes. Formatting / style might be an issue. Pricing and calculations are forced in the basic version and the paid version does not appear to provide any option for no price to be displayed. It also fails to provide booked vs unbooked dates as information to potential clients.

    AweBooking v3.0.7 https://awethemes.com/

    While the features list says it will be great, the actual interface is dreadful. Read the Documentation which only says install just like any other plugin. There is no further information. Create rooms, change settings, save settings, and still cannot create a booking, cannot see any availability calendar, no information on short-codes, etc. Read the reviews and you would not want to waste your time on this plugin.

    Pinpoint Booking System v2.7.8 http://www.dotonpaper.net/

    Requires registration with Pinpoint and perhaps purchase to get key features. It is built to be an automated booking system which is specifically not wanted. An error when trying to activate the plugin is not a good start. Tried several times and gave up. I think the path is missing a trailing / but I am not about to repair someone elses code.

    “Warning: sessionname(): Cannot change session name when session is active in /home/testsite/publichtml/wp-content/plugins/booking-system/framework/includes/class-session.php on line 129

    Warning: iniset(): Headers already sent. You cannot change the session module’s ini settings at this time in /home/testsite/publichtml/wp-content/plugins/booking-system/framework/includes/class-session.php on line 134″

    WooCommerce Accommodation Bookings v1.1.2 https://woocommerce.com/

    Cannot run without Woocommerce Bookings and that is a US$249 premium before you can test it. Did not proceed any further.

    WP Booking System v1.5 http://www.wpbookingsystem.com/

    This is an all-up purchase and an independent plugin, no subscription or connection to an external site. It is a ‘booking system’, a framework to roll-your-own booking solution. It seemed like a lot of work and effort to configure even a simple booking process, and the free version is limited to a single calendar, which makes testing of a dual calendar impossible. Granted we would only want 2 calendars, but layouts and formatting of a dual calendar is required. This plugin might be just the thing but roll-your-own means more time, more cost.

    WP Simple Booking Calendar v1.5.2 http://www.wpsimplebookingcalendar.com/

    This one possibly had more to offer, but I had already narrowed down a few features that I did not see in the list for this one, and I discounted it fairly early in the review.

    WPBooking v1.8.1 https://wpbooking.org/

    Reads like it is simple to use, but it is ‘accomodation’ with so many assumed conditions that it is restricted to suiting multi room hotel type accomodation. Trying to configure a ‘cottage’ BnB means all fields still need to be filled in for 1 Location, 1 Property, 1 Room Type, 1 Room, 1 Bedroom, etc… Instructions are inaccurate and cursory at best. Finding your way around is trial and error. The Quick Start assumes you are already familiar with this specific application.

    Summary

    There a lots and lots of options, (although I read a review that said there were not many options available but the ones reviewed were all for sale at the one market place provider, which stinks of commission sales attempts!).

    It could be that your choice of booking or event calendar needs features that I dismissed.

    The honorable mentions, because I will keep them in mind for future application are the WP Simple Booking Calendar from  http://www.wpsimplebookingcalendar.com/ and  WPBooking over at https://wpbooking.org/

    So while your mileage may vary, I would recommend you consider WP Booking Calendar from https://wpbookingcalendar.com/