stcr / subscribe-to-comments-reloaded

Subscribe to Comments Reloaded allows commenters to sign up for e-mail notifications of subsequent replies.
56 stars 32 forks source link

Bug Report: Warning: Attempt to read property "post_type" on null in .../wp-includes/link-template.php on line 4066 #746

Closed manu-p closed 1 year ago

manu-p commented 1 year ago

Hi,

WP 6.1 / Subscribe to Comments Reloaded 220725

When users get to https://lepassepartout.fr/comment-subscriptions/ the following warnings are displayed:

Warning: Attempt to read property "post_type" on null in /homepages/18/d319076814/htdocs/lpp/wp-includes/link-template.php on line 4066

Warning: Attempt to read property "post_type" on null in /homepages/18/d319076814/htdocs/lpp/wp-includes/link-template.php on line 4068

Warning: Attempt to read property "post_type" on null in /homepages/18/d319076814/htdocs/lpp/wp-includes/link-template.php on line 4066

Warning: Attempt to read property "post_type" on null in /homepages/18/d319076814/htdocs/lpp/wp-includes/link-template.php on line 4068 Warning: Attempt to read property "post_parent" on null in /homepages/18/d319076814/htdocs/lpp/wp-includes/post-template.php on line 724 class="page-template-default page page-id--999 page-parent custom-background wp-embed-responsive theme-signify woocommerce-no-js woolementor wl woocommerce fluid-layout navigation-classic no-sidebar full-width-layout excerpt header-media-fluid header-media-text-disabled has-header-image color-scheme-photography menu-type-classic menu-style-full-width header-style-two cookies-set cookies-accepted elementor-default elementor-kit-10643 transparent-header-color-scheme">

I can supply system info by mail.

BobaWebDev commented 1 year ago

Hi @manu-p

Seems like some plugin is having a bit of a problem because it's a virtual (fake) page used for the comments subscription.

Send over the system info via the contact form on https://subscribe-reloaded.com/contact/ and I'll try to replicate the issue and figure out a solution.

Alternatively you could create a real page for the /comment-subscriptions/

  1. Go to WP Admin > StCR > Management Page
  2. Set "Virtual management page" to "No" and save changes
  3. Go to WP admin > Pages > Add New and create a page called "Comment subscriptions", the permalink should be comment-subscriptions
  4. As the content of that page just add [stcr_management_page]
manu-p commented 1 year ago

Thank you @BobaWebDev The workaround you suggest has done the trick, it works fine now. I sent you the stcr sysinfo as requested, just for your further investigation.

BobaWebDev commented 1 year ago

You're welcome @manu-p