[OzzModz] XFOptimize - Minify, Preconnect & Preload [Deleted]

Noticed this strange error in my error log when going through..

  • ErrorException: Template error: [E_USER_WARNING] Method canEdgeCache is not callable on the given object (SV\LazyImageLoader\XF\Template\Templater)
  • src/XF/Template/Templater.php:1186
  • Generated by:
  • Jan 17, 2023 at 1:49 PM

Stack trace​

#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/boardga1/...', 1186)
#1 src/XF/Template/Templater.php(1186): trigger_error('Method canEdgeC...', 512)
#2 internal_data/code_cache/templates/l1/s0/public/helper_js_global.php(275): XF\Template\Templater->method(Object(SV\LazyImageLoader\XF\Template\Templater), 'canEdgeCache', Array)
#3 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#4 internal_data/code_cache/templates/l1/s0/admin/helper_js_global.php(12): XF\Template\Templater->callMacro('helper_js_globa...', 'body', Array, Array)
#5 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#6 internal_data/code_cache/templates/l1/s0/admin/PAGE_RUN_JOB.php(76): XF\Template\Templater->callMacro('helper_js_globa...', 'body', Array, Array)
#7 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#8 src/addons/MaZ/AUN/XF/Template/Templater.php(38): XF\Template\Templater->renderTemplate('PAGE_RUN_JOB', Array, true, NULL)
#9 src/XF/Admin/App.php(246): MaZ\AUN\XF\Template\Templater->renderTemplate('admin:PAGE_RUN_...', Array)
#10 src/XF/App.php(2151): XF\Admin\App->renderPageHtml('




<form acti...', Array, Object(XF\Mvc\Reply\View), Object(Nulumia\XFOptimize\XF\Mvc\Renderer\Html))
#11 src/XF/Admin/App.php(125): XF\App->renderPage('




<form acti...', Object(XF\Mvc\Reply\View), Object(Nulumia\XFOptimize\XF\Mvc\Renderer\Html))
#12 src/XF/Mvc/Dispatcher.php(404): XF\Admin\App->renderPage('




<form acti...', Object(XF\Mvc\Reply\View), Object(Nulumia\XFOptimize\XF\Mvc\Renderer\Html))
#13 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#14 src/XF/App.php(2353): XF\Mvc\Dispatcher->run()
#15 src/XF.php(524): XF\App->run()
#16 admin.php(13): XF::runApp('XF\\Admin\\App')
#17 {main}

Request state​

array(4) {
["url"] => string(24) "/admin.php?tools/run-job"
["referrer"] => string(56) "/admin.php?tools/run-job"
["_GET"] => array(1) {
["tools/run-job"] => string(0) ""
}
["_POST"] => array(3) {
["_xfRedirect"] => string(93) "/admin.php?add-ons/install-from-archive-complete&batch_id=264"
["_xfToken"] => string(8) "********"
["only_ids"] => string(5) "********"
}
}
 
Ah okay. Just saw references to XFO several places so assumed it was here. I'll post it in the Xon thread. 👍
 
Does the preconnect feature also add dns-prefetch? Or does it auto tag all external with preconnect? Since not all third-party resources may want to be preconnected (non critical resources should rather be added with dns-prefetch to not impact loading of other important resources/CPU load).

Just wondering if the google one was added by XFO. Also, notice that some have www and some not. I thought the www was not supposed to be included. Youtube one was missing, so I added that one manually.

And it is supposed to be "fonts.googleapis.com", not having // before it? It adds my site URL before it in when I view the source code when not using // first, causing the url to "fail".
The dns prefetch one works.

CSS:
<link rel="preconnect" href="fonts.gstatic.com" />
<link rel="preconnect" href="fonts.googleapis.com" />
<link rel="preconnect" href="www.google.com" />
<link rel="preconnect" href="www.googletagmanager.com" />
<link rel="dns-prefetch" href="//www.google.com" />

<link rel="preconnect" data-from="global" href="youtube.com" />
 
1) Bug: Checking my website to see if my images follows "good practise" and reveal errors, using RespImageLint.
There I noticed the following issues for ANY pages that has avatar images.
This is triggered by the XFO option "Use responsive avatars".
So the idea is well, but maybe not implemented correctly?

1675209510798.png


2) Can vendor-compiled.js not be "defered" by the Defer JS setting?

3) Cross issue that may connect to XenPorta Improvements addon. The auto preconnect feature preconnects all feature images in the XenPorta feature slider. Though it should only do this for the hero/front image. Loading all (f.ex 5 images) as preconnect will cause the page to load slower as it will prioritize loading lots of images that are not even displayed during the intial page load..

For others using the addon: Notice any effect of the "Swap attachments with thumbnails on mobile" on mobile?

I am waiting to buy this addon from Ozzy (owned it from Nulumia) once it is updated again.. Still in RC.
 
Last edited:
Found out how to display country flags using this add-on: disable the setting below.

View attachment 280903

Yeah I also have issues with that setting, hopefully will be improved in next update.

We’ll look into it as soon as possible. 🙁

Thanks. I understand the situation probably isn't ideal for you as well.. :\ Just a shame these products are not receiving more frequent bug fixes (primarily) and updates. Hopefully it will improve soon.
 
If I have no further information from Nulumia, on or after March 11th 2023 I will be moving in one of two directions on this addon.

1) Refund any purchases that were made while the addon was being sold on Snog’s site. Then the addon will no longer be under my control.
2) Take over development completely of the addon and fix any outstanding bugs.

I’m not sure which option I am going with. I just ask that anyone that bought the addon from me give me time (30-40 days), I’ll either refund the money for the purchase (made to Snog’s) or fix the addon.
 
Top Bottom