AMPXF - AMP for Xenforo 2

AMPXF - AMP for Xenforo 2 [Paid] 1.4.9

No permission to buy (€50.00)
I have a few more questions. As you may already know, I don't advertise and consequently no Google Adsense either. I don't use Google Analytics either. But now I've read that you should definitely use GA when using AMP. Is that correct? I also have a managed dedicated server without root access. Unfortunately, the software configuration is not really optimal. There is nothing I can do about that. And it is also not possible to install and use OPcache, Redis or other useful programs. The loading times themselves are actually really good. Only the TTFB still worries me a little. Would that improve significantly through the use of AMPXF? Or rather not?
AdSense and GAnalytics are not a must.. There is no "benefit" to using GAnalytics alongside AMP, other than what the analytics brings you otherwise (being able to see how your traffic is doing) :)

TTFB will improve greatly for the end-user coming in through the search engines, as the content will be served through Google/Bing AMP caches, which are handled by them. So when bing/google crawl your AMP pages, the TTFB is irrelevant as it will be served to the end user from a really fast source (their AMP Caches)

Hope that helps :) 👍
 
Heads up, I installed the 1.4.1 Beta 1 and it appeared to install fine, however 20 minutes later I went to my site and it was down with a database error. (I didn't have logging turned on so I dont know what the error was sorry) but I disabled pplugins then disabled AmpXF and turned on plugins again and the site was back online.
 
Heads up, I installed the 1.4.1 Beta 1 and it appeared to install fine, however 20 minutes later I went to my site and it was down with a database error. (I didn't have logging turned on so I dont know what the error was sorry) but I disabled pplugins then disabled AmpXF and turned on plugins again and the site was back online.
Just another note... I reinstalled 1.4.1 Beta 1 and now everything is running fine. Not sure what happened the first time around.
 
Heads up, I installed the 1.4.1 Beta 1 and it appeared to install fine, however 20 minutes later I went to my site and it was down with a database error. (I didn't have logging turned on so I dont know what the error was sorry) but I disabled pplugins then disabled AmpXF and turned on plugins again and the site was back online.
Hmm that's weird.. The database shouldn't be relevant at all as the addon doesn't store anything special there.. The XF addon installation framework/process probably does some things with the DB, but that should be same for all addons.

Did you check if the site was running fine after the install, or only 20 minutes after the install?
Just another note... I reinstalled 1.4.1 Beta 1 and now everything is running fine. Not sure what happened the first time around.
Good thing you got it up and running again :) 👍

The biggest benefit is yet to come i think. May 2021 google algo update is supposed to leverage core web vitals as a ranking signal.
Only time will tell :)
 
I’ve added a content security policy to my .htacces

Code:
### Content Security Policy
Header set Content-Security-Policy: "default-src * data: 'unsafe-inline' 'unsafe-hashes'"

But that gives me a error in the amp console:
Content-Security-Policy needs fixing
Your server sets the content-security-policy header without the required blob: * part.
This is required for amp-bind to work.
If CSP is not set correctly, the "click to expand"-links in quotes and article threads won't work.

What do I need to change that to in order to get it to work?
 
I think I resolved it.


Code:
### Content Security Policy
Header set Content-Security-Policy: "default-src blob: * data: 'unsafe-inline' 'unsafe-hashes'"
 
@mazzly Does this Server error log from your addon?

Code:
ErrorException: Template error: [E_USER_WARNING] Cannot call method isIgnoring on a non-object (NULL) src/XF/Template/Templater.php:1151

Generated by: Rahul Synal Apr 11, 2021 at 10:31 PM

Stack trace

#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/nadda/pub...', 1151, Array)
#1 src/XF/Template/Templater.php(1151): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l1/s0/public/bb_code_tag_quote.php(11): XF\Template\Templater->method(NULL, 'isIgnoring', Array)
#3 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, NULL)
#4 src/addons/MaZ/AMP/XF/Template/XF22/Templater.php(52): XF\Template\Templater->renderTemplate('bb_code_tag_quo...', Array, true, NULL)
#5 src/XF/BbCode/Renderer/Html.php(1102): MaZ\AMP\XF\Template\XF22\Templater->renderTemplate('public:bb_code_...', Array)
#6 src/addons/MaZ/AMP/XF/BbCode/Renderer/Html.php(45): XF\BbCode\Renderer\Html->getRenderedQuote('
    

    <div class...', 'O...12', Array, Array)
#7 src/XF/BbCode/Renderer/Html.php(1046): MaZ\AMP\XF\BbCode\Renderer\Html->getRenderedQuote('
    

    <div class...', 'O...12', Array, Array)
#8 [internal function]: XF\BbCode\Renderer\Html->renderTagQuote(Array, 'O...12, post: 1...', Array, Array, Object(SV\AdvancedBbCodesPack\XF\BbCode\Renderer\Html))
#9 src/XF/BbCode/Renderer/Html.php(308): call_user_func(Array, Array, 'O...12, post: 1...', Array, Array, Object(SV\AdvancedBbCodesPack\XF\BbCode\Renderer\Html))
#10 src/addons/KL/EditorManager/BbCode/EditorManagerTrait.php(144): XF\BbCode\Renderer\Html->renderTag(Array, Array)
#11 src/XF/BbCode/Traverser.php(61): KL\EditorManager\XF\BbCode\Renderer\Html->renderTag(Array, Array)
#12 src/XF/BbCode/Traverser.php(37): XF\BbCode\Traverser->renderSubTree(Array, Array)
#13 src/XF/BbCode/Traverser.php(20): XF\BbCode\Traverser->renderAst(Array, Object(SV\AdvancedBbCodesPack\XF\BbCode\RuleSet), Array)
#14 src/XF/SubContainer/BbCode.php(220): XF\BbCode\Traverser->render('[QUOTE="O...12,...', Object(SV\AdvancedBbCodesPack\XF\BbCode\Parser), Object(SV\AdvancedBbCodesPack\XF\BbCode\RuleSet), Array)
#15 src/addons/KL/EditorManager/XF/Pub/Controller/Post.php(36): XF\SubContainer\BbCode->render('[QUOTE="O...12,...', 'html', 'post', Object(ThemeHouse\Notifier\XF\Entity\Post))
#16 src/XF/Mvc/Dispatcher.php(350): KL\EditorManager\XF\Pub\Controller\Post->actionReact(Object(XF\Mvc\ParameterBag))
#17 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Post', 'React', Object(XF\Mvc\RouteMatch), Object(SV\UserEssentials\XF\Pub\Controller\Post), NULL)
#18 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserEssentials\XF\Pub\Controller\Post), NULL)
#19 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#20 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#21 src/XF.php(488): XF\App->run()
#22 index.php(20): XF::runApp('XF\\Pub\\App')
#23 {main}

Request state

array(4) {
  ["url"] => string(34) "/posts/1913328/react?reaction_id=1"
  ["referrer"] => string(43) "/threads/79043/page-4"
  ["_GET"] => array(1) {
    ["reaction_id"] => string(1) "1"
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(21) "/threads/79043/page-4"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
@mazzly Does this Server error log from your addon?

Code:
ErrorException: Template error: [E_USER_WARNING] Cannot call method isIgnoring on a non-object (NULL) src/XF/Template/Templater.php:1151

Generated by: Rahul Synal Apr 11, 2021 at 10:31 PM

Stack trace

#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/nadda/pub...', 1151, Array)
#1 src/XF/Template/Templater.php(1151): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l1/s0/public/bb_code_tag_quote.php(11): XF\Template\Templater->method(NULL, 'isIgnoring', Array)
#3 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(MaZ\AMP\XF\Template\XF22\Templater), Array, NULL)
#4 src/addons/MaZ/AMP/XF/Template/XF22/Templater.php(52): XF\Template\Templater->renderTemplate('bb_code_tag_quo...', Array, true, NULL)
#5 src/XF/BbCode/Renderer/Html.php(1102): MaZ\AMP\XF\Template\XF22\Templater->renderTemplate('public:bb_code_...', Array)
#6 src/addons/MaZ/AMP/XF/BbCode/Renderer/Html.php(45): XF\BbCode\Renderer\Html->getRenderedQuote('
   

    <div class...', 'O...12', Array, Array)
#7 src/XF/BbCode/Renderer/Html.php(1046): MaZ\AMP\XF\BbCode\Renderer\Html->getRenderedQuote('
   

    <div class...', 'O...12', Array, Array)
#8 [internal function]: XF\BbCode\Renderer\Html->renderTagQuote(Array, 'O...12, post: 1...', Array, Array, Object(SV\AdvancedBbCodesPack\XF\BbCode\Renderer\Html))
#9 src/XF/BbCode/Renderer/Html.php(308): call_user_func(Array, Array, 'O...12, post: 1...', Array, Array, Object(SV\AdvancedBbCodesPack\XF\BbCode\Renderer\Html))
#10 src/addons/KL/EditorManager/BbCode/EditorManagerTrait.php(144): XF\BbCode\Renderer\Html->renderTag(Array, Array)
#11 src/XF/BbCode/Traverser.php(61): KL\EditorManager\XF\BbCode\Renderer\Html->renderTag(Array, Array)
#12 src/XF/BbCode/Traverser.php(37): XF\BbCode\Traverser->renderSubTree(Array, Array)
#13 src/XF/BbCode/Traverser.php(20): XF\BbCode\Traverser->renderAst(Array, Object(SV\AdvancedBbCodesPack\XF\BbCode\RuleSet), Array)
#14 src/XF/SubContainer/BbCode.php(220): XF\BbCode\Traverser->render('[QUOTE="O...12,...', Object(SV\AdvancedBbCodesPack\XF\BbCode\Parser), Object(SV\AdvancedBbCodesPack\XF\BbCode\RuleSet), Array)
#15 src/addons/KL/EditorManager/XF/Pub/Controller/Post.php(36): XF\SubContainer\BbCode->render('[QUOTE="O...12,...', 'html', 'post', Object(ThemeHouse\Notifier\XF\Entity\Post))
#16 src/XF/Mvc/Dispatcher.php(350): KL\EditorManager\XF\Pub\Controller\Post->actionReact(Object(XF\Mvc\ParameterBag))
#17 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Post', 'React', Object(XF\Mvc\RouteMatch), Object(SV\UserEssentials\XF\Pub\Controller\Post), NULL)
#18 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserEssentials\XF\Pub\Controller\Post), NULL)
#19 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#20 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#21 src/XF.php(488): XF\App->run()
#22 index.php(20): XF::runApp('XF\\Pub\\App')
#23 {main}

Request state

array(4) {
  ["url"] => string(34) "/posts/1913328/react?reaction_id=1"
  ["referrer"] => string(43) "/threads/79043/page-4"
  ["_GET"] => array(1) {
    ["reaction_id"] => string(1) "1"
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(21) "/threads/79043/page-4"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
Hmm I don't think so as it is not related to AMP pages..
 
Just curious. Has anyone tried creating a page rule for https://domain.name/*/?amp=1 in cloudflare with a short full cache setting? It should logically load the page entirely from Cloudflare nodes right? And since these are non interactive pages, it does make sense to do something like this? Probably would become a mess with AMP error fixes though. I do not think this has been discussed before so just putting it out there for thoughts.
 
Top Bottom