Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 798 forks source link

Contact Form / AMP compatibility issues #36548

Open Juut13 opened 6 months ago

Juut13 commented 6 months ago

Impacted plugin

Jetpack

Quick summary

I posted this on the WordPress forums of Jetpack and was asked to post this here.

I have Jetpack installed and want to use Amp. Amp gives the error that it's not compatible with jetpack. I did research it before and Jetpack says it works with Amp. Amp tells me to contact Jetpack.

Raw validation data which you may want to share with the author so they can fix AMP compatibility:

[ { “url”: “https://xxx/”, “type”: “is_singular[page]”, “label”: “Page”, “amp_url”: “https://xxx/?amp=1”, “validation_errors”: [ { “node_name”: “script”, “parent_name”: “body”, “code”: “DISALLOWED_TAG”, “type”: “js_error”, “node_attributes”: { “type”: “text/javascript”, “src”: “https://xxx/_jb_static/??/wp-includes/js/hoverintent-js.min.js,/wp-includes/js/admin-bar.min.js?m=1708635854&cb=1” }, “node_type”: 1, “sources”: [ { “type”: “plugin”, “name”: “jetpack”, “file”: “jetpack_vendor/automattic/jetpack-forms/src/contact-form/class-contact-form-plugin.php”, “line”: 56, “function”: “Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::init”, “hook”: “init”, “priority”: 9, “dependency_type”: “script”, “handle”: “admin-bar”, “dependency_handle”: “hoverintent-js” }, { “type”: “plugin”, “name”: “jetpack”, “file”: “jetpack_vendor/automattic/jetpack-forms/src/contact-form/class-contact-form-plugin.php”, “line”: 56, “function”: “Automattic\Jetpack\Forms\ContactForm\Contact_Form_Plugin::init”, “hook”: “init”, “priority”: 9, “dependency_type”: “script”, “handle”: “hoverintent-js” } ] } ], “stale”: false, “error”: false, “validated_url_post”: { “id”: 1243, “edit_link”: “https://xxx/wp-admin/post.php?post=1243&action=edit” } } ]

Can you tell me how to solve this? I really like jetpack so far, but I need more to optimize.

Steps to reproduce

While activating the AMP plugin, deactivated it because I want to use Jetpack.

A clear and concise description of what you expected to happen.

No response

What actually happened

No response

Impact

One

Available workarounds?

There is no user impact

Platform (Simple and/or Atomic)

No response

Logs or notes

No response

jeherve commented 6 months ago

Thanks for the report. Unfortunately the only thing you could do on your end would be to deactivate AMP for that specific page where you've added the contact form. You can follow the instructions here to learn how to do that: https://www.youtube.com/watch?v=pMRZzP7ty-E

On our end, we'll see what we can do to make the contact form feature more compatible with the AMP plugin.

Juut13 commented 6 months ago

Thank you!

github-actions[bot] commented 4 days ago

This issue has been marked as stale. This happened because:

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.