• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Resolved Every AMS Post That I Open With a Image Attach i Get a Error in Server Log

palhanow

Member
AMS
Bob, one more question just appear for me today.

I was looking my last articles, all with 'cover images', and I'm getting this error. Happens every time that i open a article:

Code:
ErrorException: Template error: [E_USER_WARNING] Macro public:xa_ams_attachment_macros:attachment_list_item is unknown src/XF/Template/Templater.php:632
Generated by: POLITZ Jan 11, 2021 at 3:08 AM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/usr/share/ngin...', 632, Array)
#1 src/XF/Template/Templater.php(632): trigger_error('Macro public:xa...', 512)
#2 src/XF/Template/Templater.php(745): XF\Template\Templater->getTemplateMacro('public', 'xa_ams_attachme...', 'attachment_list...')
#3 src/addons/MaZ/AMP/XF/Template/Templater.php(77): XF\Template\Templater->callMacro('xa_ams_attachme...', 'attachment_list...', Array, Array, NULL)
#4 internal_data/code_cache/templates/l3/s9/public/xa_ams_article_view.php(598): MaZ\AMP\XF\Template\Templater->callMacro('xa_ams_attachme...', 'attachment_list...', Array, Array)
#5 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#6 src/addons/MaZ/AMP/XF/Template/Templater.php(72): XF\Template\Templater->renderTemplate('xa_ams_article_...', Array, true, NULL)
#7 src/XF/Template/Template.php(24): MaZ\AMP\XF\Template\Templater->renderTemplate('public:xa_ams_a...', Array)
#8 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#9 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XenAddons\\AMS:A...', 'public:xa_ams_a...', Array)
#10 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#11 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#13 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#14 src/XF.php(488): XF\App->run()
#15 index.php(20): XF::runApp('XF\\Pub\\App')
#16 {main}
Request state
array(4) {
["url"] => string(151) "/ams/5-x-0-pela-obrigatoriedade-compulsoriedade-da-vacinacao-contra-a-praga-chinesa-no-stf-alexandre-de-moraes-e-edson-fachin-votam-a-favor.1929/?amp=1"
["referrer"] => bool(false)
["_GET"] => array(2) {
["/ams/5-x-0-pela-obrigatoriedade-compulsoriedade-da-vacinacao-contra-a-praga-chinesa-no-stf-alexandre-de-moraes-e-edson-fachin-votam-a-favor_1929/"] => string(0) ""
["amp"] => string(1) "1"
}
["_POST"] => array(0) {
}
}

And another:


Code:
ErrorException: Template error: [E_USER_WARNING] Template public:xa_ams_attachment_macros is unknown src/XF/Template/Templater.php:664
Generated by: POLITZ Jan 11, 2021 at 3:08 AM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/usr/share/ngin...', 664, Array)
#1 src/XF/Template/Templater.php(664): trigger_error('Template public...', 512)
#2 src/XF/Template/Templater.php(626): XF\Template\Templater->getTemplateData('public', 'xa_ams_attachme...')
#3 src/XF/Template/Templater.php(745): XF\Template\Templater->getTemplateMacro('public', 'xa_ams_attachme...', 'attachment_list...')
#4 src/addons/MaZ/AMP/XF/Template/Templater.php(77): XF\Template\Templater->callMacro('xa_ams_attachme...', 'attachment_list...', Array, Array, NULL)
#5 internal_data/code_cache/templates/l3/s9/public/xa_ams_article_view.php(598): MaZ\AMP\XF\Template\Templater->callMacro('xa_ams_attachme...', 'attachment_list...', Array, Array)
#6 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#7 src/addons/MaZ/AMP/XF/Template/Templater.php(72): XF\Template\Templater->renderTemplate('xa_ams_article_...', Array, true, NULL)
#8 src/XF/Template/Template.php(24): MaZ\AMP\XF\Template\Templater->renderTemplate('public:xa_ams_a...', Array)
#9 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#10 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XenAddons\\AMS:A...', 'public:xa_ams_a...', Array)
#11 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#14 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#15 src/XF.php(488): XF\App->run()
#16 index.php(20): XF::runApp('XF\\Pub\\App')
#17 {main}
Request state
array(4) {
["url"] => string(151) "/ams/5-x-0-pela-obrigatoriedade-compulsoriedade-da-vacinacao-contra-a-praga-chinesa-no-stf-alexandre-de-moraes-e-edson-fachin-votam-a-favor.1929/?amp=1"
["referrer"] => bool(false)
["_GET"] => array(2) {
["/ams/5-x-0-pela-obrigatoriedade-compulsoriedade-da-vacinacao-contra-a-praga-chinesa-no-stf-alexandre-de-moraes-e-edson-fachin-votam-a-favor_1929/"] => string(0) ""
["amp"] => string(1) "1"
}
["_POST"] => array(0) {
}
}

I just installed a AMP add-on for my Forum (AMPXF) and maybe the cause.

Is better to call the developer too or we can fix in AMS?
 
Last edited:
You have some out dated templates or improperly merged templates. You need to fix that issue with one or more of your styles. Once you fix that, those errors will go away.
 
You have some out dated templates or improperly merged templates. You need to fix that issue with one or more of your styles. Once you fix that, those errors will go away.

Thanks Bob!

Any idea how I should begin to do this? Have to reinstall my Theme?

And this template situation, is applicate to the other ticket too?

I'm trying to find the template "xa_ams_attachment_macros" but i got this: "No results found."

This is a case to rebuild AMS or I'm doing something wrong?

upload_2021-1-11_7-29-51.png
 
Last edited by a moderator:
I'm trying to find the template "xa_ams_attachment_macros" but i got this: "No results found."
That is because I REMOVED that template and am now using the core xf "attachment_macros" template instead. You have an OUTDATED or IMPROPERLY MERGED template that is still trying to include the "xa_ams_attachment_macros" template instead of including the "attachment_macros" template. You need to FIX THAT (auto merging should have handled it).

Instead of doing a search on TITLE CONTAINS, add xa_ams_attachment_macros into the TEXT CONTAINS. That will tell you which template(s) are still trying to include the "xa_ams_attachment_macros". If any of those are AMS templates, you will need to REVERT those so that they are STOCK AMS and then re-apply any custom edits. If they are NOT AMS templates, then edit them and remove the include to the "xa_ams_attachment_macros" as that template no longer exists.

Should be fairly easy to resolve (and the change should have auto merged like it has for everyone else.
 
Reverted my friend!

The "xa_ams_attachment_macros" was on "xa_ams_article_view" for some reason.

And i don't know why I'm always get confused when dealing with templates, auto merging and stuff.

No more errors.

Thank you so much Bob.
 
  • Like
Reactions: Bob
Back
Top