AMPXF - AMP for Xenforo 2

AMPXF - AMP for Xenforo 2 2.3.0 Patch Level 3

No permission to buy (€50.00)
It seems with the release of XF2.2.12 the new advanced cookie consent was rekease (Note: It is still considered beta). You can see example screenshot from suggestion thread here

Anyway, if you enable the new Advanced cookie consent, pages that have e.g. Youtube embeds will likely complain to not be valid AMP pages, as there currently is no handling for the template-code that is inserted to support lazy-loading embeds... We, therefore, recommend that you stick with the "Simple" mode for now :)

The AMPXF consent dialogues will need to be planned a bit more around things to ensure we do it correctly and also e.g. allow your users to set more granular consent.

If the planning/implementation takes longer, it might be that we in the meantime release a version that basically "strips out" this extra non-AMP-compatible code to have valid pages. It would then show the embed after the normal consent dialogue is accepted.
Updated cookie consent to show correctly with XF 2.2.12 where they have changed the cookie option naming.
People on older versions will still work as normal
  • Like
Reactions: nodle
Previous release had a bug that made redirect responses be sent to canonical page also.

It is now fixed so that only bad responses (4XX & 5XX) will be redirected to canonical page if AMP page was redirected.

After installing the fix, please go start the AMPBot up again by pressing the "play" button (it shows up when paused)
1668752075925.webp


Due to this problem the AMPBot would pause:
  1. AMPBot requested a URL from sitemap (usually not ending in /
  2. Site/forum redirects request to URL that ends in /
  3. AMPXF addon caught this 301/302 request and instead redirected it to the canonical page (i.e. non-AMP page)
  4. AMPBot recognizes that "This is not an AMP page"
    1. After too many failures => Pauses itself
This problem might also affect the googlebot, but will likely take a few days to show up in search console. If/when that happens, simply validate the fix and it will go away.
  • Pages that are not HTTP 200 and contains ?amp=1 are redirected to the canonical page
  • The broken link checker shouldn't falsely mark index.php? and admin.php as broken links anymore
With this fix release the AMP pages have a template-template_name class added to the html element. e.g. template-amp_thread_view that can be used for specific styling rules on certain pages.
There was a missing ad position for Post: Above content that was added in this fix-release
There is no need to install the version unless you are on 2.2.10
  • Suppress error raised by 2.2.10 XF Core bug when (Only when on that version)
  • Bugfix: skip running cronjob logic when "Fix unknown image sizes" is disabled
  • Adds missing index over the tries column to speedup queries when fixing unknown images
  • Improved usedClasses()-function so that it handles newlines inside markup like class="foo\nbar"
  • Like
Reactions: JoyFreak
  • Added some compatibility fixes for PHP8.1 deprecation warnings
  • Like
Reactions: Nirjonadda
Back
Top Bottom