Title: WordPress Customizer Doesn&#8217;t Work When Webcomic is Enabled
Last modified: May 10, 2021

---

# WordPress Customizer Doesn’t Work When Webcomic is Enabled

 *  [orribu](https://wordpress.org/support/users/orribu/)
 * (@orribu)
 * [5 years ago](https://wordpress.org/support/topic/wordpress-customizer-doesnt-work-when-webcomic-is-enabled/)
 * Hello! I’m having an issue with loading the WordPress Customizer when Webcomic
   is enabled. When I enable webcomic and open appearance>customize, I’m greeted
   with an infinite loading screen.
 * All the plugins and themes have been updated. This is what I’m working with:
 * > WordPress ver. 5.7.1
   > Self-hosted, using HTTPS
   > Theme: Blocksy (Child)
   >  Plugins: Age Gate, Version 2.15.0; Akismet Anti-Spam,
   > Version 4.1.9; Blocksy Companion, Version 1.8.5; Branda, Version 3.4.5; BuddyPress,
   > Version 7.3.0; Easy Username Updater, Version 1.0.4; GDPR Cookie Consent, Version
   > 2.0.1; Invitation Based Registrations, Version 2.2.82; Jetpack by WordPress.
   > com, Version 9.7; Loginizer, Version 1.6.6; Patreon WordPress, Version 1.7.4;
   > reCaptcha by BestWebSoft, Version 1.61; SG Optimizer, Version 5.7.20; Webcomic,
   > Version 5.0.6; Wordfence Login Security, Version 1.0.6; Wordfence Security,
   > Version 7.5.2; WP Maintenance Mode, Version 2.3.0; WPS Hide Login, Version 
   > 1.8.5
   > Server architecture: Linux 3.12.18-clouder0 x86_64
   > Web server: Apache
   > PHP version: 7.3.27 (Supports 64bit values)
 * Does anyone have an idea of what could be causing the issue? I’ve started testing
   the possibility of a conflict with another plugin, and nothing’s turned up.

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [Mike](https://wordpress.org/support/users/mgsisk/)
 * (@mgsisk)
 * [5 years ago](https://wordpress.org/support/topic/wordpress-customizer-doesnt-work-when-webcomic-is-enabled/#post-14420493)
 * I haven’t tested it with all of those plugins yet, but a fresh install of WP 
   5.7.1, Blocksy, and Webcomic 5.0.6 doesn’t seem to cause any issues with the 
   customizer (serving with Apache on a Linux VM using PHP 7.3). It’s possible some
   combination of those plugins and Webcomic is conflicting, though, which might
   still point to a Webcomic issue. I’ll post again if I can figure out what combination
   is causing the problem.
 *  Thread Starter [orribu](https://wordpress.org/support/users/orribu/)
 * (@orribu)
 * [5 years ago](https://wordpress.org/support/topic/wordpress-customizer-doesnt-work-when-webcomic-is-enabled/#post-14436650)
 * [@mgsisk](https://wordpress.org/support/users/mgsisk/) Thanks for getting back
   to me! I’ll be running diagnostics as well to see what can be done on my end.
   I really appreciate you helping out with that!
 *  [fefes](https://wordpress.org/support/users/fefes/)
 * (@fefes)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/wordpress-customizer-doesnt-work-when-webcomic-is-enabled/#post-14518103)
 * I’m also having this issue – although overlaps would be Age Gate, and Jetpack
   for the site I was running it on. It wasn’t a clean install but deactivating 
   everything BUT Webcomic still causes Composer to stop loading. Not sure if that
   helps much but I’m very much keen to keep an eye on this one because I don’t 
   really like any of the other options for webcomic CMSs right now!
 *  [mylittlepangreas](https://wordpress.org/support/users/mylittlepangreas/)
 * (@mylittlepangreas)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/wordpress-customizer-doesnt-work-when-webcomic-is-enabled/#post-14580536)
 * I was having the same error, what I found was that when I add a background image
   on my theme (ePorfolio) the customizer would break if the webcomics plugin enabled.
   my image is a png so maybe the file format is the issue but not sure.
 *  [Jamie Isfeld](https://wordpress.org/support/users/jamieisfeld/)
 * (@jamieisfeld)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/wordpress-customizer-doesnt-work-when-webcomic-is-enabled/#post-14580556)
 * I am also experiencing this issue with all themes I’ve tested except the WP defaults.
   Considering that the output of this plugin is initially configured via the Customizer,
   it’s a pretty big concern.
 *  [mylittlepangreas](https://wordpress.org/support/users/mylittlepangreas/)
 * (@mylittlepangreas)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/wordpress-customizer-doesnt-work-when-webcomic-is-enabled/#post-14584977)
 * This is the PHP error I get when I change the background image and causes the
   customizer to break.
 *     ```
       [22-Jun-2021 18:48:02 UTC] PHP Warning:  Invalid argument supplied for foreach() in C:\wamp64\www\wordpress\wp-content\plugins\webcomic\lib\collection\media.php on line 190
       [22-Jun-2021 18:48:02 UTC] PHP Stack trace:
       [22-Jun-2021 18:48:02 UTC] PHP   1. {main}() C:\wamp64\www\wordpress\wp-admin\customize.php:0
       [22-Jun-2021 18:48:02 UTC] PHP   2. do_action() C:\wamp64\www\wordpress\wp-admin\customize.php:281
       [22-Jun-2021 18:48:02 UTC] PHP   3. WP_Hook->do_action() C:\wamp64\www\wordpress\wp-includes\plugin.php:484
       [22-Jun-2021 18:48:02 UTC] PHP   4. WP_Hook->apply_filters() C:\wamp64\www\wordpress\wp-includes\class-wp-hook.php:316
       [22-Jun-2021 18:48:02 UTC] PHP   5. WP_Customize_Manager->customize_pane_settings() C:\wamp64\www\wordpress\wp-includes\class-wp-hook.php:292
       [22-Jun-2021 18:48:02 UTC] PHP   6. WP_Customize_Background_Image_Control->json() C:\wamp64\www\wordpress\wp-includes\class-wp-customize-manager.php:4969
       [22-Jun-2021 18:48:02 UTC] PHP   7. WP_Customize_Background_Image_Control->to_json() C:\wamp64\www\wordpress\wp-includes\class-wp-customize-control.php:336
       [22-Jun-2021 18:48:02 UTC] PHP   8. wp_prepare_attachment_for_js() C:\wamp64\www\wordpress\wp-includes\customize\class-wp-customize-upload-control.php:61
       [22-Jun-2021 18:48:02 UTC] PHP   9. get_media_states() C:\wamp64\www\wordpress\wp-includes\media.php:4126
       [22-Jun-2021 18:48:02 UTC] PHP  10. apply_filters() C:\wamp64\www\wordpress\wp-admin\includes\template.php:2348
       [22-Jun-2021 18:48:02 UTC] PHP  11. WP_Hook->apply_filters() C:\wamp64\www\wordpress\wp-includes\plugin.php:212
       [22-Jun-2021 18:48:02 UTC] PHP  12. Mgsisk\Webcomic\Collection\hook_add_post_media_states() C:\wamp64\www\wordpress\wp-includes\class-wp-hook.php:294
       [22-Jun-2021 18:48:02 UTC] PHP Warning:  array_unique() expects parameter 1 to be array, bool given in C:\wamp64\www\wordpress\wp-content\plugins\webcomic\lib\collection\settings\general.php on line 329
       [22-Jun-2021 18:48:02 UTC] PHP Stack trace:
       [22-Jun-2021 18:48:02 UTC] PHP   1. {main}() C:\wamp64\www\wordpress\wp-admin\customize.php:0
       [22-Jun-2021 18:48:02 UTC] PHP   2. do_action() C:\wamp64\www\wordpress\wp-admin\customize.php:281
       [22-Jun-2021 18:48:02 UTC] PHP   3. WP_Hook->do_action() C:\wamp64\www\wordpress\wp-includes\plugin.php:484
       [22-Jun-2021 18:48:02 UTC] PHP   4. WP_Hook->apply_filters() C:\wamp64\www\wordpress\wp-includes\class-wp-hook.php:316
       [22-Jun-2021 18:48:02 UTC] PHP   5. WP_Customize_Manager->customize_pane_settings() C:\wamp64\www\wordpress\wp-includes\class-wp-hook.php:292
       [22-Jun-2021 18:48:02 UTC] PHP   6. WP_Customize_Background_Image_Control->json() C:\wamp64\www\wordpress\wp-includes\class-wp-customize-manager.php:4969
       [22-Jun-2021 18:48:02 UTC] PHP   7. WP_Customize_Background_Image_Control->to_json() C:\wamp64\www\wordpress\wp-includes\class-wp-customize-control.php:336
       [22-Jun-2021 18:48:02 UTC] PHP   8. wp_prepare_attachment_for_js() C:\wamp64\www\wordpress\wp-includes\customize\class-wp-customize-upload-control.php:61
       [22-Jun-2021 18:48:02 UTC] PHP   9. get_media_states() C:\wamp64\www\wordpress\wp-includes\media.php:4126
       [22-Jun-2021 18:48:02 UTC] PHP  10. apply_filters() C:\wamp64\www\wordpress\wp-admin\includes\template.php:2348
       [22-Jun-2021 18:48:02 UTC] PHP  11. WP_Hook->apply_filters() C:\wamp64\www\wordpress\wp-includes\plugin.php:212
       [22-Jun-2021 18:48:02 UTC] PHP  12. Mgsisk\Webcomic\Collection\Settings\hook_add_collection_media_state() C:\wamp64\www\wordpress\wp-includes\class-wp-hook.php:294
       [22-Jun-2021 18:48:02 UTC] PHP  13. array_unique() C:\wamp64\www\wordpress\wp-content\plugins\webcomic\lib\collection\settings\general.php:329
       ```
   
 *  [mylittlepangreas](https://wordpress.org/support/users/mylittlepangreas/)
 * (@mylittlepangreas)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/wordpress-customizer-doesnt-work-when-webcomic-is-enabled/#post-14585647)
 * I was able to fix this issue by commenting on a section of a function on the 
   general.php under lib\collection\settings\general.php.
 *     ```
       function general() {
       	add_filter( 'admin_init', __NAMESPACE__ . '\hook_add_section_general' );
       	add_filter( 'admin_init', __NAMESPACE__ . '\hook_add_field_name' );
       	add_filter( 'admin_init', __NAMESPACE__ . '\hook_add_field_slug' );
       	add_filter( 'admin_init', __NAMESPACE__ . '\hook_add_field_permalink' );
       	add_filter( 'admin_init', __NAMESPACE__ . '\hook_add_field_description' );
       	add_filter( 'admin_init', __NAMESPACE__ . '\hook_add_field_media' );
       	add_filter( 'admin_init', __NAMESPACE__ . '\hook_add_field_archive' );
       	add_filter( 'admin_init', __NAMESPACE__ . '\hook_add_field_syndicate' );
       	add_filter( 'admin_init', __NAMESPACE__ . '\hook_add_field_supports' );
       	add_filter( 'admin_head', __NAMESPACE__ . '\hook_add_help_general' );
       	add_filter( 'current_screen', __NAMESPACE__ . '\hook_enqueue_media_manager' );
       	add_filter( 'delete_attachment', __NAMESPACE__ . '\hook_delete_collection_media' );
       /**	add_filter( 'display_media_states', __NAMESPACE__ . '\hook_add_collection_media_state' );  */
       ```
   
 * And adding an array verification if statement into the next function inside de
   media.php on \lib\collection\media.php
 *     ```
       function hook_add_post_media_states( array $states ) : array {
       	$comics = get_post_meta( get_the_ID(), 'webcomic_post' );
       		if (is_array($comics) || is_object($comics))
       		{
       		foreach ( $comics as $comic ) {
       			$collection = get_post_type( $comic );
   
       			if ( isset( $states[ $collection ] ) ) {
       				continue;
       			} elseif ( ! webcomic_collection_exists( $collection ) ) {
       				delete_post_meta( get_the_ID(), 'webcomic_post', $comic );
   
       				continue;
       			}
   
       			// Translators: Post type name.
       			$states[ $collection ] = sprintf( __( '%s Comic Image', 'webcomic' ), webcomic( "option.{$collection}.name" ) );
       			}
       		}
       	return $states;
       }
       ```
   
 * Now I’m sure the function modification will not break anything but I’m not sure
   what will happen with commenting on the argument on the first general.php part.
 *  [mylittlepangreas](https://wordpress.org/support/users/mylittlepangreas/)
 * (@mylittlepangreas)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/wordpress-customizer-doesnt-work-when-webcomic-is-enabled/#post-14585929)
 * Never mind, this broke the links for the comics, do the function for checking
   for array is working nice
 *  Plugin Author [Mike](https://wordpress.org/support/users/mgsisk/)
 * (@mgsisk)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/wordpress-customizer-doesnt-work-when-webcomic-is-enabled/#post-14587958)
 * Thank you for posting the error [@mylittlepangreas](https://wordpress.org/support/users/mylittlepangreas/);
   I’ll see if I can troubleshoot this and get a patch released.
 *  [Kevin](https://wordpress.org/support/users/thekevinwilson/)
 * (@thekevinwilson)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/wordpress-customizer-doesnt-work-when-webcomic-is-enabled/#post-14725837)
 * So the customizer also broke for me and I wanted to post what fixed it in case
   anyone has a similar situation. I was using [Generatepress](https://generatepress.com/)
   and Webcomic together on a [Flywheel Local](https://localwp.com/) install to 
   test out how to use them togeter for a client. Sometime while I was testing out
   different layouts I noticed my Customizer wasn’t working anymore. I’d load up
   the page and all I’d see is the name of the site and no options.
 * I tried everything:
 * – Turned off themes, plugins. Even deleted webcomic and reinstalled.
    – Swapped
   themes (weird exception the old Comicpress theme I was converting) – Deleted 
   cache, adjusted my php version/memory limit – Turning on WP_DEBUG did not post
   any error on screen or generate a log
 * Nothing worked. But what did fix it was using [this tool](https://github.com/stracker-phil/wp-no-white-screen/)
   WordPress linked to in [their guide on tracking errors](https://wordpress.org/support/article/debugging-in-wordpress/).
 * In particular, it was this line of code in my wp-config file:
    @ini_set(‘display_errors’,
   0);
 * Weirdly, I can now see my customizer again. I did turn on the debug bar and took
   screenshots of everything I saw in case this helps someone. [I’ll link to it here in a zip file](https://drive.google.com/file/d/1gT8h4ZS4ZHjPTj-aIVDDAnGUj-ge4QFV/view?usp=sharing).
 * Anyways, I hope this post helps someone in the future!
 *  [jmacintosh](https://wordpress.org/support/users/jmacintosh/)
 * (@jmacintosh)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/wordpress-customizer-doesnt-work-when-webcomic-is-enabled/#post-14913572)
 * [@mgsisk](https://wordpress.org/support/users/mgsisk/)
    My friend and I are experiencing
   the same issue on our website. With a site background image enabled, we get multiple
   errors when trying to Customize Appearance, and without one the Customization
   works fine. I’m going to be trying some of the solutions listed above, but an
   official patch would be appreciated!
 *  [azpheromega](https://wordpress.org/support/users/azpheromega/)
 * (@azpheromega)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/wordpress-customizer-doesnt-work-when-webcomic-is-enabled/#post-15369088)
 * Hi, this problem is still present. No word on if it will be fixed?
    The plugin
   is basically non-functional this way.
 *  [Erin Ptah](https://wordpress.org/support/users/sailorptah/)
 * (@sailorptah)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/wordpress-customizer-doesnt-work-when-webcomic-is-enabled/#post-15369570)
 * Issue thread on the official Git archive:
 * [https://github.com/mgsisk/webcomic/issues/372](https://github.com/mgsisk/webcomic/issues/372)
 * I figure a fix is more likely to be posted there than here, so it was worth dropping
   a link.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘WordPress Customizer Doesn’t Work When Webcomic is Enabled’ is closed
to new replies.

 * ![](https://ps.w.org/webcomic/assets/icon.svg?rev=1810569)
 * [Webcomic](https://wordpress.org/plugins/webcomic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/webcomic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/webcomic/)
 * [Active Topics](https://wordpress.org/support/plugin/webcomic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/webcomic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/webcomic/reviews/)

 * 13 replies
 * 9 participants
 * Last reply from: [Erin Ptah](https://wordpress.org/support/users/sailorptah/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/wordpress-customizer-doesnt-work-when-webcomic-is-enabled/#post-15369570)
 * Status: not resolved