Skip Navigation

[Resolved] The [cred_delete_post_link] creates an empty iframe, which creates AdBlock error

This support ticket is created 2 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by michaelB-31 2 years, 2 months ago.

Assisted by: Waqar.

Author
Posts
#2453093
2-dev-tools-error.jpg
1-empty-iframe.jpg

Hi support,

OK, I have a really strange problem. Here what's happening:

I have a view which uses the following shortcode to generate "delete" links:
[cred_delete_post_link class='cred-refresh-after-delete' text='Löschen' message='Sind Sie sicher?' message_show='1' action='trash']

As I have now observed, this creates an empty iframe within a <div>, which is hidden (see screenshot 1).

Now currently the AdBlock extension in Google Chrome generates this error in the DevTools Console (see screenshot 2):
DevTools failed to load source map: Could not load content for chrome-hidden link: System error: net::ERR_FILE_NOT_FOUND

Those 2 things lead to my really strange problem: As my view can have hundreds of entries (= hundreds of delete links with as much hidden iframes), this error message is generated for each iframe (in the screenshot 2 only 25 times). Additionally, this view is dynamically reloaded after an ajax submit, which again causes this error. After 3-4 such submits/reloads, the browser gets a "white screen of death" with a "out of memory" error (like this: hidden link ).

I know, this is a really unique combination of issues, and the main cause seems to be the AdBlock extension, and I also already contacted their support. But maybe you have an idea how I could somehow fix or bypass this? For example: Is this empty iframe really needed? Because it seems generally kind of bloated with so much iframes, which affects the whole page load speed.

Thanks a lot in advance for any tips and best regards,
Michael

#2453581

Hi Michael,

Thank you for contacting us and I'd be happy to assist.

The shortcode "cred_delete_post_link" is an older implementation for the post delete link and we now officially recommend using the newer "cred-delete-post" shortcode instead:
https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred-delete-post

Example:


[cred-delete-post action='trash' onsuccess='self']Delete[/cred-delete-post]

If you'll switch to this shortcode, you'll see that it doesn't rely on an iframe to delete the post.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2453787

Hi Waqar,

Thanks for your answer, this would solve the problem.

BUT: A delete link without a confirmation dialog (as you explained here: https://toolset.com/forums/topic/how-can-i-add-a-confirmation-dialog-prior-to-deleting-a-post/#post-2385225)?! No way I can use that. I assume there is no way to add a confirmation dialog again?

Best regards,
Michael

#2453813

Thanks for writing back and your observation is correct.

The newer shortcode doesn't support the confirmation message/dialog feature, so I'm afraid, you'll have to choose between the two shortcodes, based on what is more important.

And you're welcome to submit a feature request for this at:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

#2453855

OK, not ideal, but thanks a lot again for your support!