picandocodigo / List-Category-Posts

WordPress plugin which allows you to list posts from a category into a post/page using the [catlist] shortcode.
http://wordpress.org/extend/plugins/list-category-posts/
GNU General Public License v2.0
241 stars 112 forks source link

Warning: Attempt to read property #506

Closed yangqiceng closed 11 months ago

yangqiceng commented 1 year ago

Warning: Attempt to read property “cat_ID” on null in /home/www/wp-content/plugins/list-category-posts/include/lcp-widget.php on line 93

Warning: Attempt to read property “name” on null in /home/www/wp-content/plugins/list-category-posts/include/lcp-widget.php on line 94

I searched on Google, and find some website show this too.

Default category. ID 1. Other category is ok. Version 0.89 Wordpress 6.3.1

klemens-st commented 1 year ago

So I assume you are using the widget and see this error only when selecting category id 1?

yangqiceng commented 12 months ago

yes, and I use the old version, it's normal.

klemens-st commented 12 months ago

Sorry, 'old version'? What do you mean?

yangqiceng commented 12 months ago

previous version is ok

Klemens Starybrat @.***> 于 2023年11月8日周三 16:26写道:

Sorry, 'old version'? What do you mean?

— Reply to this email directly, view it on GitHub https://github.com/picandocodigo/List-Category-Posts/issues/506#issuecomment-1801308039, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMT6WVSZMFR6GYTGWAVUNLYDM64TAVCNFSM6AAAAAA5S5O7V6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBRGMYDQMBTHE . You are receiving this because you authored the thread.Message ID: @.***>

klemens-st commented 12 months ago

Can you be more specific? What old version, what number?

yangqiceng commented 12 months ago

0.88.1 is ok

Klemens Starybrat @.***> 于 2023年11月9日周四 03:45写道:

Can you be more specific? What old version, what number?

— Reply to this email directly, view it on GitHub https://github.com/picandocodigo/List-Category-Posts/issues/506#issuecomment-1802542973, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMT6WTDCUOKSZPGSQD7YCTYDPOORAVCNFSM6AAAAAA5S5O7V6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBSGU2DEOJXGM . You are receiving this because you authored the thread.Message ID: @.***>

klemens-st commented 11 months ago

I can't reproduce it. I think the reason is related to where exactly the widget is placed. Is it in the footer, sidebar or something else? Does the error appear on all pages or just specific ones?

yangqiceng commented 11 months ago

sidebar, you may search it on Google, some website may show this error

Klemens Starybrat @.***> 于 2023年11月13日周一 17:47写道:

I can't reproduce it. I think the reason is related to where exactly the widget is placed. Is it in the footer, sidebar or something else? Does the error appear on all pages or just specific ones?

— Reply to this email directly, view it on GitHub https://github.com/picandocodigo/List-Category-Posts/issues/506#issuecomment-1807799495, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMT6WQBVGIWJ2FDOWTVD73YEHUDFAVCNFSM6AAAAAA5S5O7V6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXG44TSNBZGU . You are receiving this because you authored the thread.Message ID: @.***>

klemens-st commented 11 months ago

Ok, I see but still can't reproduce. Can you post a screenshot of your LCP widget configuration?

klemens-st commented 11 months ago

I was able to reproduce, will prepare a fix

yangqiceng commented 11 months ago

Awesome, thank you so much!

Klemens Starybrat @.***> 于 2023年11月13日周一 21:03写道:

I was able to reproduce, will prepare a fix

— Reply to this email directly, view it on GitHub https://github.com/picandocodigo/List-Category-Posts/issues/506#issuecomment-1808125688, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMT6WXV46P5KA2MX627KE3YEILBBAVCNFSM6AAAAAA5S5O7V6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBYGEZDKNRYHA . You are receiving this because you authored the thread.Message ID: @.***>