Git Product home page Git Product logo

Comments (8)

pgraham3 avatar pgraham3 commented on August 11, 2024 1

Awesome - thanks for confirming, @kyletaylored! 🫡

from postmark-wordpress.

pgraham3 avatar pgraham3 commented on August 11, 2024

Hey @bhubbard - Should we be checking those constants from Postmark_Mail (postmark.php) are defined in class-postmark-debug.php or could we concatenate the constants with an empty string on these lines to resolve these warnings? I don't quite get why this warning would be shown at all since all the $debug_info['postmark-wordpress'] array keys are quoted and POSTMARK_DIR is being used for a string value.

from postmark-wordpress.

bhubbard avatar bhubbard commented on August 11, 2024

@pgraham3 Hmm yeah it's not clear why those would be undefined unless the plugin was modified or running in a non-typical method. We could probably update the debug file to do a check to kill the notice, something like this:

defined( POSTMARK_DIR ) ? POSTMARK_DIR : 'NOT DEFINED';

Ideally if not defined we display the text in yellow or red to let them know it's probably an issue.

from postmark-wordpress.

kyletaylored avatar kyletaylored commented on August 11, 2024

I'm actually getting this as a Fatal Error vs just a warning on the Site Info page.

Fatal error: Uncaught Error: Undefined constant "POSTMARK_VERSION" in /code/wp-content/plugins/postmark-approved-wordpress-plugin/includes/class-postmark-debug.php:34

Stack trace: 
#0 /code/wp-includes/class-wp-hook.php(307): Postmark_Debug->debug_info(Array) 
#1 /code/wp-includes/plugin.php(191): WP_Hook->apply_filters(Array, Array) 
#2 /code/wp-admin/includes/class-wp-debug-data.php(1461): apply_filters('debug_informati...', Array) 
#3 /code/wp-admin/site-health-info.php(32): WP_Debug_Data::debug_data() 
#4 /code/wp-admin/includes/class-wp-site-health.php(66): require_once('/code/wp-admin/...') 
#5 /code/wp-includes/class-wp-hook.php(307): WP_Site_Health->show_site_health_tab('debug') 
#6 /code/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) 
#7 /code/wp-includes/plugin.php(476): WP_Hook->do_action(Array) 
#8 /code/wp-admin/site-health.php(205): do_action('site_health_tab...', 'debug') 
#9 {main} thrown in /code/wp-content/plugins/postmark-approved-wordpress-plugin/includes/class-postmark-debug.php on line 34

image

PHP Version: 8.0.21
WordPress Version: 6.0.1
Plugin version: 1.17.1

from postmark-wordpress.

pgraham3 avatar pgraham3 commented on August 11, 2024

I have a proposed PR for this here. Mind taking a look at that @bhubbard?

I also have it up as a tag (1.17.2) on the plugin marketplace.

@kyletaylored can you try out version 1.17.2 and let me know if that resolves the error?

You can update to version 1.17.2 using the wp-cli:

$ wp plugin update postmark-approved-wordpress-plugin --version=1.17.2

from postmark-wordpress.

kyletaylored avatar kyletaylored commented on August 11, 2024

Error still seems to persist.

image

Fatal error: Uncaught Error: Undefined constant "POSTMARK_VERSION" in /code/wp-content/plugins/postmark-approved-wordpress-plugin/includes/class-postmark-debug.php:36 

Stack trace: 
#0 /code/wp-includes/class-wp-hook.php(307): Postmark_Debug->debug_info(Array) 
#1 /code/wp-includes/plugin.php(191): WP_Hook->apply_filters(Array, Array) 
#2 /code/wp-admin/includes/class-wp-debug-data.php(1461): apply_filters('debug_informati...', Array) 
#3 /code/wp-admin/site-health-info.php(32): WP_Debug_Data::debug_data() 
#4 /code/wp-admin/includes/class-wp-site-health.php(66): require_once('/code/wp-admin/...') 
#5 /code/wp-includes/class-wp-hook.php(307): WP_Site_Health->show_site_health_tab('debug') 
#6 /code/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) 
#7 /code/wp-includes/plugin.php(476): WP_Hook->do_action(Array) 
#8 /code/wp-admin/site-health.php(205): do_action('site_health_tab...', 'debug') 
#9 {main} thrown in /code/wp-content/plugins/postmark-approved-wordpress-plugin/includes/class-postmark-debug.php on line 36

from postmark-wordpress.

pgraham3 avatar pgraham3 commented on August 11, 2024

Thanks @kyletaylored! I see the issue.

I needed to have the constants' names in quotes for the defined() check. I just updated the 1.17.2 tag with that change.

Please reinstall version 1.17.2 and let me know how it goes.

from postmark-wordpress.

kyletaylored avatar kyletaylored commented on August 11, 2024

Yep, that did it!

image

from postmark-wordpress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.