Why is my Gutenberg block returning an error after initial save?

I created a Gutenberg block but after saving it and going back into the post I receive this error: This block contains unexpected or invalid content I couldn’t find any inconsistencies and I had a friend also take a look over to see if there was anything amiss. What am I doing wrong? registerBlockType(‘myblog/check-list’, { … Read more

Application passwords not working on localhost?

I have to get following error on the localhost “code”:”application_passwords_disabled” Server & Apache: Xampp v3.2.4 OP: Win 10 64Bit WP: v5.6.1 1 Answer 1 That error could happen if wp_is_application_passwords_available() returns a false, and the docs says: By default, Application Passwords is available to all sites using SSL or to local environments. Use ‘wp_is_application_passwords_available’ to … Read more

get_terms return errors

Hi when i try to get_terms(); in theme options via this code $catalogs_terms = get_terms( ‘catalogs’ ); $mycatalogs = array( -1 => ‘Select a catalog’ ); if ( $catalogs_terms ) { foreach ( $catalogs_terms as $catalog_term ) { $mycatalogs[$catalog_term->term_id] = $catalog_term->name; } } return empty but this code is working fine every where in pages … Read more

Does WordPress have a built in reference to the PHP version its running under? [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange. Closed 9 years ago. Improve this question I have a plugin that has a single method that requires PHP5. How can I code around the fact that the … Read more

How to use add_settings_error in register_setting callback

public function database_name_check($input){ //debug add_settings_error(‘notice’, ‘lol’, ‘lol’); if($this->wpdb->get_var($this->wpdb->prepare(‘SHOW DATABASES LIKE %s’, $input)) == $input) return $input; else{ add_settings_error(‘notice’, ‘lol’, ‘lol’); return FALSE; } } I can not understand why the error does not exceed, any suggestions? 1 Answer 1 Take a look at the add_settings_error prototype. add_settings_error( $setting, $code, $message, $type ); The first argument … Read more

Trying to get property of non-object in wp-includes/capabilities.php

Once a minute I get the following notice sequence in debug.log: [23-Oct-2012 13:27:33 UTC] PHP Notice: Trying to get property of non-object in mysite/wp-includes/capabilities.php on line 1022 [23-Oct-2012 13:27:33 UTC] PHP Notice: Trying to get property of non-object in mysite/wp-includes/capabilities.php on line 1023 [23-Oct-2012 13:27:33 UTC] PHP Notice: Trying to get property of non-object in … Read more

How can I see the error generated by plugin activation?

I’m developing a plugin and upon activation, I get the following error: The plugin generated xxx characters of unexpected output during activation How can I see what unexpected output is generated? I have turned on debugging, but it doesn’t help: define(‘WP_DEBUG’, true); if (WP_DEBUG) { define(‘WP_DEBUG_LOG’, true); define(‘WP_DEBUG_DISPLAY’, true); @ini_set(‘display_errors’, 1); } Update FYI – … Read more