I figured out what was causing this, but it was by trial and error since there was no good debug info. And the error was in the main (custom post calling) part of my plugin, NOT in the options as I had surmised earlier. I ended up finding out that I needed to be using
'content' => $p->post_content
in my query/foreach loop in place of
'content' => get_the_content($p->ID)
and that the error line in the original debug (line 289) was failing on a function called “get_the_content” (ie, the one I was using), which ended up being clear after the fact (although it would have been nice if that particular line in my code had been indicated in the debug). Anyway, this would not work without a global $post variable, which caused all kinds of other content problems. But simply pulling the content directly (instead of via the get_the_content function) has solved my issue. Hope this helps someone else.
Related Posts:
- error_log() output for print_r() appearing on page
- “Undefined index” error when saving empty array with checkboxes
- Should I use spl_autoload_register() in my plugin?
- When to use Exceptions vs Error Objects vs just plain false/null
- Utilize WP-CLI from inside WordPress, not SSH
- error_log is not working as expected in functions.php file
- Why when I instantiate wp_error in a validation method my user registration method stops working?
- “Notice: Undefined variable: content” is showing [closed]
- Same log message keeps on printing to debug.log file thousand of times
- Mute Debug Messages from Plugins
- Hooks for post saving make a post-new.php to load latest post’s data
- I am having errors with checkout on wordpress
- File is executed twice if plugin is activating
- How to identify which php file a plugin is using on page load?
- How to send logs to plugin owner for a plugin?
- I’m writing my first plugin and my echo output is showing up on every page of my wordpress installation
- global $post inside plugin query messes up every new post page in wp-admin
- Accessing Variables Used In a Plugin Using PHPStorm + XDebug
- WordPress won’t display errors at all
- WordPress White Screen Error
- Submit form to db
- How can I fix this code [duplicate]
- Get category id when SEO URL is turned on
- Trying to display terms from custom taxonomy within function
- “Rendering of admin template [path to template] failed”
- Help with accessing wp-admin page and resolving error messages
- Blog suddenly shows Archive instead of index page
- Too many errors on log
- Programmatically revert to backup .htaccess a possibility?
- Prevent post from being published and show error
- PHP: $_SESSION destroyed after page reload for my custom session
- send popup after wp_redirect()
- WordPress – Get Posts with Category data
- no_rest_route error on custom routes
- Add a custom WooCommerce settings tab with sections
- Flatten Responses returned via WP REST API via WP_Error for obfuscation
- Publish button now showing content after saving
- How to use wp_send_json() and output the value with ajax?
- How does add_option() function enable action hooks to fire right after actiavtion?
- How to correctly escape an echo
- PHP using external anonymous function inside class
- Ajax on the Administration Side of plugin – wp_localize_script – how to pass value from JQuery to PHP function in class?
- Problem with inserting multiple images in gallery of each WooCommerce product programmatically
- Is it possible to access admin-ajax.php using PHP?
- Payment field disappears on custom Paypal plugin
- Illegal string offset in PHP function in via Theme Customizer
- Call to “admin_notices” hook from a static method
- How to Create custom block for displaying information in content section which act like shortcode
- Using ACF Relationship field to set post type to draft or published status
- Adding image upload in tag section – WordPress plugin development
- How to detect and handle the time difference between server and user in WordPress?
- Create plugin with custom page and template caused an error `Call to undefined function get_header()`
- How to Remove Theme Style CSS inside Custom Plugin?
- WordPress can’t use ZipArchive
- How to setup the Email piping in WordPress plugin?
- Can’t log in to WordPress wp-admin after adding code to functions.php
- Create ACF Checkbox to get all ACF Values from Parent Page
- Settings API form – submit with AJAX
- How to extend SelectControl with data from my theme
- How to change basename url for wp-admin?
- Post form – AJAX won’t upload featured image – Plugin development
- Creating plugin with front-end pages
- Cannot find the php_ini configuration file to find my error log to see why my code is not working
- How to Send Pingbacks for all Posts in WordPress?
- Reliable way to add nonce to HTTP Header in WordPress?
- White screen after migrating site, but wp-admin works fine. Disabling all plugins, applying default theme and enabling debug mode does nothing
- Fatal error login WordPress [duplicate]
- Only the first image uploads
- Getting an error when my plugin is updated, but the files update correctly
- WordPress loading progess – wp-blog-header.php
- Creating a POP Alert
- Add Pre-Defined Value to Click Counter in WordPress
- Illegal string offset checkbox
- Intermittent 503 Service Unavailable Error
- var_dump() and print_r() display null in php
- Fatal error: wp-settings.php on line 199
- ssl redirect function is not working
- product_type_options get saved value [closed]
- Custom plugin: how do I call a PHP file if settings option is set to true?
- PHP Warning: mysqli_query(): after updating my websites php from 5.6 to 7.2
- Plugin won’t output characters with diacritics properly
- Trying to use a variable to set image width
- How to display only specific Error types in debug.log? No notices, warnings, etc
- How can i avoid duplicate same post in wp?
- Drop down question
- Display a custom name when the user has no name settle in his account
- wp_update_post gives 500 internal error
- WP Hook Before a post is created
- WordPress Plugin Development – get_option error
- how to add new PHP page in WordPress plugin
- How do I disable cache for a certain page?
- How can I get my WordPress plugin to receive data and relay it in an ajax/php request to a remote server that requires authentication?
- code that I can run, or a plug in to show what sql tables something pulls information from
- Automatic email message after manual user approval
- WordPress Bad Request Error 400
- How can I update the price when someone enters postcode or zip code in woocommerce checkout page?
- Submit remote form to wordpress REST API and save data to custom post type
- How to check if plugin update process completed in wordpress?
- Foreach Loop Of Post Types With Nested If Else If Not Completing Process
- ACF relationship on user profile page used for allowed access