Archived topic
Undefined index: linkType
31 replies · Started by Josef on February 15, 2022
On my website (GP Premium Version 2.1.2) I got this error message displayed under every post:
Notice: Undefined index: url in /home/public_html/wp-content/plugins/gp-premium/elements/class-block-elements.php on line 1304
Notice: Undefined index: linkType in /home/public_html/wp-content/plugins/gp-premium/elements/class-block-elements.php on line 1304
Why?
How to fix it?
Hi there,
what Block Eleemnts do you have hooked in at the bottom of your posts? I see the Post Navigation. Are there any others ?
Where can I check that?
Go to Dashboard > Appearance > Elements, and if you can provide a screen shot of that.
screenshot: https://prnt.sc/26w6vh1
If you select and Quick Edit the Post Navgiation block element and set its status to Draft does the front end error go away ?
I did that, and no the error did not go away.
Screenshot of the new setting: https://prnt.sc/26w77lz
Not that one :)
This one:
Whooopsy :D
YES, this made the error disappear.
So, what's next?
Good question as it should not cause an error.
As a test, can you leave that element saved as a draft. Then:
1. Create a new Block Element,
2. In the element select the Element Type > Post Navigation
https://docs.generatepress.com/article/block-element-post-navigation/
3. Expand the Template panel and add a template - one that looks similar to your existing.
4. Check the options to: Disable default post navigation & Add default archive navigation container
5. Set its Display Rules to Posts > All Posts
6. Publish
Does that display correctly without error on the posts ?
I did everyhting as you said, and the error is back.
The new element: https://prnt.sc/26w87f3
Also, maybe helpful:
In the WP Appearance/Elements, when I click on this new element, or on the previous one that was set to draft, before the element editor page is loaded, for a second I see the exact same error messages displayed.
Are you using any custom functions on the site? Or any plugins that affect the Permalink structure ?
No, I don't use any plugins that would affect permalinks.
My permalinks are set by wordpress general settings.
I could give you access to my site if that helps
If you could provide us with Temporary admin login we can have a look.
You can use the Private Information field to share those details
Here you go