Archived topic
Undefined array key "url" in class-block-elements.php on line 1304
17 replies · Started by Peter on May 24, 2022
I'm getting this error on my posts page when I have config set to display errors. I've tested in both PHP 8.0 and 8.1, same messages. Anybody else see this?
Warning: Undefined array key "url" in [redacted]/wp-content/plugins/gp-premium/elements/class-block-elements.php on line 1304
Warning: Undefined array key "linkType" in [redacted]/wp-content/plugins/gp-premium/elements/class-block-elements.php on line 1304
Warning: Undefined array key "linkType" in [redacted]/wp-content/plugins/gp-premium/elements/class-block-elements.php on line 1304
Hi there,
We haven't seen this before.
Have you added any elements in Appearance > Elements?
I did a web search and found the same error message on another site out in the wild.
I hadn't touched that page (the Projects template in a theme I imported, I think your construction theme?). I just happened to turn on error reporting to troubleshoot an SSL error and saw these messages on that page, which is the default posts list page.
Thank you!
There isn't a Projects template in the elements of the original Construction site:
https://www.screencast.com/t/jYkkzKjKRUT
Are you referring to the Posts Content Template?
Sorry to confuse, it's not an element, it's one of the pages, called Projects, which is used to display posts. In that Page, every Post is labeled a "project" (project portfolio item).
Now I'm confused. Can't see how that page would trigger the error you are seeing.
Does the error disappear if you disable (set to draft) the Posts Content Template element indicated above?
Yes the error disappears but the posts (post list) still show up! Interesting, thank you
Can you check if the Image URL still shows as gpsites.co?
https://www.screencast.com/t/zwIPlNrsA8ue
And what happens if you update that link to use a link from your media library?
changing that background image to one from my server doesn't change anything. Errors still there.
It looks like Tom was able to fix in the issue in the upcoming version:
https://generatepress.com/forums/topic/undefined-index-linktype/page/3/#post-2123559
Any chance you can start a staging site for me to try to identify the issue in your case?
Thanks Leo.
I have a staging site you can mess with, yes. Can you DM me somehow?
You can use the private info field:
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Gotcha, will do. Thanks for all the quick responses. What email address should I use?
Hi Peter,
You may use Kindly share the credentials through the Private Information field once created.
Thank you!
ok I'm sending teh deets. Thanks y'all