- This topic has 11 replies, 3 voices, and was last updated 3 years, 4 months ago by
David.
-
AuthorPosts
-
December 10, 2022 at 11:20 am #2457286
Dan
I use the ThirstyAffiliates plugin and have discovered that when I use them in an Element, the link gets removed.
To demonstrate this, I created a test page on my staging site. Only ThirstyAffilliate and GP plugins are enabled.
On the page I inserted an affiliate link using the standard post editor and then inserted the same link using a hooked block Element. The link to the test page is in the private section. You will see that one link works fine, while the other is no longer a link and is styled differently.
Inspecting these two links, you’ll see that the one inserted using the element has had className: “thirstylink” stripped from it, which maybe the cause of the problem. Why?
When inserting the affiliate link in the Element builder page, it works just fine. It only breaks on output.
December 10, 2022 at 4:38 pm #2457416Leo
StaffCustomer SupportHi there,
The element module doesn’t have the ability to strip anything or alter the HTML output.
When I view the source, I’m seeing a
<ta>tag:
https://www.screencast.com/t/vNYNVBJAIdbpIs that supposed to be correct? I’ve never seen a
<ta>tag and Google research didn’t come up with anything either.December 11, 2022 at 11:58 am #2458173Dan
It has the tag, but the class has been removed.
Here is the link output from the element: https://capture.dropbox.com/kfJxJLfgPaYsE57r
Here is the same link output from the regular post editor: https://capture.dropbox.com/xR2417QJfzTYrZlV
Click the link in chrome inspector and go to the properties tab to view this info yourself.
December 11, 2022 at 3:37 pm #2458295Leo
StaffCustomer SupportCan you check with ThirstyAffiliates’s support team to see if they have any idea what would be causing this?
The element module is simply a custom post type and nothing special – it really doesn’t have the ability to strip anything.
I can’t recall another mention of HTML being altered in Element either.
You might want to go through some debugging steps like disabling all plugins except GP Premium and ThirstyAffiliates to make sure there aren’t any odd conflicts happening either.
December 11, 2022 at 3:43 pm #2458305Dan
That is strange because I have output ThirstyAffiliate links in other custom post types with no problem. I will ask the TA people, but can you also ask around your other support agents to see if they have seen anything like this?
“You might want to go through some debugging steps like disabling all plugins except GP Premium and ThirstyAffiliates to make sure there aren’t any odd conflicts happening either.”
Yes, I already did that. TA and GP Premium are the only plugins running on the staging site I sent you a link to.
December 11, 2022 at 3:47 pm #2458312Leo
StaffCustomer Supportbut can you also ask around your other support agents to see if they have seen anything like this?
Will do!
December 11, 2022 at 3:50 pm #2458314Leo
StaffCustomer SupportAnother idea to test, can you use a hook function instead of the element to add it and see if that works?
https://docs.generatepress.com/article/using-hooks/December 12, 2022 at 5:26 am #2458864David
StaffCustomer SupportHi there,
1. How are these added top the page ? Are they HTML or are they a Shortcode ?
2. What is the
<ta>tag Leo referred to ? – see here:December 12, 2022 at 10:44 am #2459452Dan
Hi David. I created a quick screen capture vid that I think answers both of those questions. It’s posted in the private section.
December 12, 2022 at 10:57 am #2459464David
StaffCustomer SupportThanks for that – its super helpful.
So we can assume that the TA plugin is doing something to swap out the<ta>for an<a>and make good all the other things on the front end.
But as we know thats not happening if its an element.So question is – how are they doing that and what does it involve?
Is it possible to ask them considering the following things that i see as being potentially an issue:
1. The content from the element is hooked in OUTSIDE of the loop. So it would not be picked up with
the_contentfilter hook.2. The Element CPT is not publicly queryalble (
'publicly_queryable' => false,) so if they are using a WP Query or something similrat they wouldn’t find them.December 12, 2022 at 11:35 am #2459488Dan
Great. Thanks for your input. I will pose this question to them.
December 13, 2022 at 2:21 am #2460111David
StaffCustomer SupportLet us know what you find 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.