Thread Thumbnail by AddonsLab

Thread Thumbnail by AddonsLab [Paid] 3.0.0 Beta 1

No permission to buy ($29.99)
Method hasThumbnail is not callable
Code:
ErrorException: Template error: [E_USER_WARNING] Method hasThumbnail is not callable on the given object (TickTackk\ChangeContentOwner\XF\Entity\Thread)
src/XF/Template/Templater.php:1163
Generated by: Unknown account
May 29, 2021 at 2:26 PM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/*****/pub...', 1163, Array)
#1 src/XF/Template/Templater.php(1163): trigger_error('Method hasThumb...', 512)
#2 internal_data/code_cache/templates/l1/s2/public/altt_thumbnail.php(21): XF\Template\Templater->method(Object(TickTackk\ChangeContentOwner\XF\Entity\Thread), 'hasThumbnail', Array)
#3 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#4 src/XF/Template/Templater.php(1657): XF\Template\Templater->renderTemplate('altt_thumbnail', Array)
#5 internal_data/code_cache/templates/l1/s2/public/thread_list_macros.php(21): XF\Template\Templater->includeTemplate('public:altt_thu...', Array)
#6 src/XF/Template/Templater.php(964): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#7 src/XF/Template/Templater.php(900): XF\Template\Templater->renderExtensionInternal('icon_cell', Array, Array, Object(XF\Template\ExtensionSet))
#8 internal_data/code_cache/templates/l1/s2/public/thread_list_macros.php(479): XF\Template\Templater->renderExtension('icon_cell', Array, Object(XF\Template\ExtensionSet))
#9 src/XF/Template/Templater.php(801): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#10 internal_data/code_cache/templates/l1/s2/public/xfes_widget_similar_threads.php(22): XF\Template\Templater->callMacro('thread_list_mac...', 'item', Array, Array)
#11 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#12 src/XF/Widget/WidgetRenderer.php(62): XF\Template\Templater->renderTemplate('xfes_widget_sim...', Array)
#13 src/XF/Widget/WidgetRenderer.php(67): XF\Widget\WidgetRenderer->render()
#14 src/XF/Template/Templater.php(1903): XF\Widget\WidgetRenderer->__toString()
#15 internal_data/code_cache/templates/l1/s2/public/thread_view.php(953): XF\Template\Templater->widgetPosition('thread_view_bel...', Array)
#16 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#17 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#18 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#19 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#20 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#21 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#22 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#23 src/XF/App.php(2337): XF\Mvc\Dispatcher->run()
#24 src/XF.php(488): XF\App->run()
#25 index.php(20): XF::runApp('XF\\Pub\\App')
#26 {main}
[HEADING=2]Request state[/HEADING]
array(4) {
  ["url"] => string(29) "/threads/public-access.17567/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Last edited:
also

Method canChangeThumbnail is not callable
Code:
ErrorException: Template error: [E_USER_WARNING] Method canChangeThumbnail is not callable on the given object (TickTackk\ChangeContentOwner\XF\Entity\Thread) src/XF/Template/Templater.php:1163
Generated by: Unknown account May 29, 2021 at 2:26 PM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/*****/pub...', 1163, Array)
#1 src/XF/Template/Templater.php(1163): trigger_error('Method canChang...', 512)
#2 internal_data/code_cache/templates/l1/s2/public/altt_thumbnail.php(7): XF\Template\Templater->method(Object(TickTackk\ChangeContentOwner\XF\Entity\Thread), 'canChangeThumbn...', Array)
#3 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#4 src/XF/Template/Templater.php(1657): XF\Template\Templater->renderTemplate('altt_thumbnail', Array)
#5 internal_data/code_cache/templates/l1/s2/public/thread_list_macros.php(21): XF\Template\Templater->includeTemplate('public:altt_thu...', Array)
#6 src/XF/Template/Templater.php(964): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#7 src/XF/Template/Templater.php(900): XF\Template\Templater->renderExtensionInternal('icon_cell', Array, Array, Object(XF\Template\ExtensionSet))
#8 internal_data/code_cache/templates/l1/s2/public/thread_list_macros.php(479): XF\Template\Templater->renderExtension('icon_cell', Array, Object(XF\Template\ExtensionSet))
#9 src/XF/Template/Templater.php(801): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#10 internal_data/code_cache/templates/l1/s2/public/xfes_widget_similar_threads.php(22): XF\Template\Templater->callMacro('thread_list_mac...', 'item', Array, Array)
#11 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#12 src/XF/Widget/WidgetRenderer.php(62): XF\Template\Templater->renderTemplate('xfes_widget_sim...', Array)
#13 src/XF/Widget/WidgetRenderer.php(67): XF\Widget\WidgetRenderer->render()
#14 src/XF/Template/Templater.php(1903): XF\Widget\WidgetRenderer->__toString()
#15 internal_data/code_cache/templates/l1/s2/public/thread_view.php(953): XF\Template\Templater->widgetPosition('thread_view_bel...', Array)
#16 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#17 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#18 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#19 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#20 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#21 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#22 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#23 src/XF/App.php(2337): XF\Mvc\Dispatcher->run()
#24 src/XF.php(488): XF\App->run()
#25 index.php(20): XF::runApp('XF\\Pub\\App')
#26 {main}
Request state
array(4) {
  ["url"] => string(29) "/threads/public-access.17567/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

and

Method getMetaThumbnailUrl is not callable
Code:
[LIST]
[*]ErrorException: Template error: [E_USER_WARNING] Method getMetaThumbnailUrl is not callable on the given object (TickTackk\ChangeContentOwner\XF\Entity\Thread)
[*]src/XF/Template/Templater.php:1163
[*]Generated by: Unknown account
[*]May 29, 2021 at 2:26 PM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/*****/pub...', 1163, Array)
#1 src/XF/Template/Templater.php(1163): trigger_error('Method getMetaT...', 512)
#2 internal_data/code_cache/templates/l1/s2/public/thread_view.php(633): XF\Template\Templater->method(Object(TickTackk\ChangeContentOwner\XF\Entity\Thread), 'getMetaThumbnai...', Array)
#3 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#4 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#5 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#6 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#7 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#8 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#10 src/XF/App.php(2337): XF\Mvc\Dispatcher->run()
#11 src/XF.php(488): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}
[HEADING=2]Request state[/HEADING]
array(4) {
  ["url"] => string(29) "/threads/public-access.17567/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
also

Method canChangeThumbnail is not callable
Code:
ErrorException: Template error: [E_USER_WARNING] Method canChangeThumbnail is not callable on the given object (TickTackk\ChangeContentOwner\XF\Entity\Thread) src/XF/Template/Templater.php:1163
Generated by: Unknown account May 29, 2021 at 2:26 PM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/*****/pub...', 1163, Array)
#1 src/XF/Template/Templater.php(1163): trigger_error('Method canChang...', 512)
#2 internal_data/code_cache/templates/l1/s2/public/altt_thumbnail.php(7): XF\Template\Templater->method(Object(TickTackk\ChangeContentOwner\XF\Entity\Thread), 'canChangeThumbn...', Array)
#3 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#4 src/XF/Template/Templater.php(1657): XF\Template\Templater->renderTemplate('altt_thumbnail', Array)
#5 internal_data/code_cache/templates/l1/s2/public/thread_list_macros.php(21): XF\Template\Templater->includeTemplate('public:altt_thu...', Array)
#6 src/XF/Template/Templater.php(964): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#7 src/XF/Template/Templater.php(900): XF\Template\Templater->renderExtensionInternal('icon_cell', Array, Array, Object(XF\Template\ExtensionSet))
#8 internal_data/code_cache/templates/l1/s2/public/thread_list_macros.php(479): XF\Template\Templater->renderExtension('icon_cell', Array, Object(XF\Template\ExtensionSet))
#9 src/XF/Template/Templater.php(801): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#10 internal_data/code_cache/templates/l1/s2/public/xfes_widget_similar_threads.php(22): XF\Template\Templater->callMacro('thread_list_mac...', 'item', Array, Array)
#11 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#12 src/XF/Widget/WidgetRenderer.php(62): XF\Template\Templater->renderTemplate('xfes_widget_sim...', Array)
#13 src/XF/Widget/WidgetRenderer.php(67): XF\Widget\WidgetRenderer->render()
#14 src/XF/Template/Templater.php(1903): XF\Widget\WidgetRenderer->__toString()
#15 internal_data/code_cache/templates/l1/s2/public/thread_view.php(953): XF\Template\Templater->widgetPosition('thread_view_bel...', Array)
#16 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#17 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#18 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#19 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#20 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#21 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#22 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#23 src/XF/App.php(2337): XF\Mvc\Dispatcher->run()
#24 src/XF.php(488): XF\App->run()
#25 index.php(20): XF::runApp('XF\\Pub\\App')
#26 {main}
Request state
array(4) {
  ["url"] => string(29) "/threads/public-access.17567/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

and

Method getMetaThumbnailUrl is not callable
Code:
[LIST]
[*]ErrorException: Template error: [E_USER_WARNING] Method getMetaThumbnailUrl is not callable on the given object (TickTackk\ChangeContentOwner\XF\Entity\Thread)
[*]src/XF/Template/Templater.php:1163
[*]Generated by: Unknown account
[*]May 29, 2021 at 2:26 PM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/*****/pub...', 1163, Array)
#1 src/XF/Template/Templater.php(1163): trigger_error('Method getMetaT...', 512)
#2 internal_data/code_cache/templates/l1/s2/public/thread_view.php(633): XF\Template\Templater->method(Object(TickTackk\ChangeContentOwner\XF\Entity\Thread), 'getMetaThumbnai...', Array)
#3 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#4 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#5 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#6 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#7 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#8 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#10 src/XF/App.php(2337): XF\Mvc\Dispatcher->run()
#11 src/XF.php(488): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}
[HEADING=2]Request state[/HEADING]
array(4) {
  ["url"] => string(29) "/threads/public-access.17567/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

These errors really confirm, that the issue is not from our add-on, but something is broken on your board, either due to installation process or from another add-on. Here are some screenshots to prove it:

1. This screenshot shows our template modification:
1622377693947.webp

You can see, we are calling a custom method on "Thread" entity object. In the same scope, the object is used many times, calling other methods on the object.

2. Screenshot showing the Thread class extended by us with the method in it:
1622377803317.webp

You can see the method, you can see the class extended using XFCP_ prefix, as recommended. Having the method there, and having the class extension active, it is simply impossible, you get the error "Method is not callable on this object".

Possible technical causes are:
1. Class extension itself is disabled, but template modification is not disabled. I don't know in which cases this could happen, but you could verify in Development mode in the admin panel:
1622377953312.webp

2. Even though you see the class extension active, the actual cache that is loading on each page has it as inactive by some reason. Rebuilding the add-on (or upgrading it to the latest version) should rebuild these caches, and if you don't get any error during upgrade, the extension should get activated. There is nothing specific the product does in such case, product code is executed only when it is installed and active, management of class extensions, their active status is done by XenForo itself.

3. Our product is fully active and functional, but there is another product, that extends the same class, and it does NOT use XFCP_ prefix, as shown in my screenshot and as recommended by XenForo.

Please let us know if this helped you to troubleshoot the issue further and if you could identify the problem.

We will release unfurl support soon.

Thank you!
 
@beerForo I have just noticed your license key is not specified in product options. That could be the cause why the add-on deactivates when no valid license key is provided. This could explain all issues you experience.

I have deleted your trial service as it has already expired, please apply for a trial or purchase the add-on to get a valid license key, and specific the key in product's options page. This should resolve all issues you have.

Thank you!
 
Sounds good! I didn't think the free trial would cause the issue. I'll upgrade via your website and let you know.
 
NOPE! I upgraded from trial to paid and still have the bug. That's what I was hoping would not happen.
The bug happens when your add-on and @TickTackk's Change Content Owner add-on are both enabled. If I disable one, no error. So it is some sort of conflict between add-ons. So now I have to disable Change Content Owner. Perhaps you and TickTackk can figure this out together? Thanks

Method hasThumbnail is not callable on the given object (TickTackk\ChangeContentOwner\XF\Entity\Thread)
src/XF/Template/Templater.php:1163

3 full stack traces above.

EDIT: Checking the other add-on
 
Last edited:
I upgraded the Change Content Owner add-on by TickTackk and it rebuilt all attachments. And I still get this error when trying to edit a post with NO attachment or thread thumbnail:
Oops! We ran into some problems.
Please enter a value for the required field 'attachment_id'.
I'm going to disable CCO for now and hope it can get sorted somehow.

Reported on CCO thread.
We will release unfurl support soon.
Plotting The Simpsons GIF
 
Last edited:
I upgraded the Change Content Owner add-on by TickTackk and it rebuilt all attachments. And I still get this error when trying to edit a post with NO attachment or thread thumbnail:
Oops! We ran into some problems.
Please enter a value for the required field 'attachment_id'.
I'm going to disable CCO for now and hope it can get sorted somehow.

Reported on CCO thread.

Plotting The Simpsons GIF

As I have just updated in Change Content Owner thread, the error mentioning their class does not have to be related to their add-on, as XenForo simply specifies the name of the class that extended the Thread entity the last.

We are going to check your board asap.

Thank you!
 
Does anyone here know how I can prevent the thread thumbnail from overlapping the title when I make it larger? As of now the TT looks good but it covers up the first few letters in the thread title.

/* thread thumbnail */

.has-thumbnail div.avatar {
width: 80px;
height: 60px;
border-radius: 5px !important;
}
 
The product replaces XenForo's default icon (which is the avatar of a user) with a thumbnail, without any size changes, as the size of the image itself basically depends on the theme you are using and what is the size of user avatars in your theme. We have discussed this with other users in this thread, and here are some CSS rules that should work for changing avatar/thumbnail width and height:
CSS:
div[data-type=thread] .structItem-cell.structItem-cell--icon {
    width: 90px;
}
This code for regular threads works but it causes WHITE SPACE after the mini avatar on the right side of the page. So if you look at the right side where the last replier avatar is there is white space after this.
 
homer TheSimpsons GIF by Live What You Love Business Coaching


This version fixes the attachment issue (tested) and adds unfurl thumbnails (tested) and my ticket was answered for the css support, and that works!

Fantastic all around thanks!


PS. Can you list the Core in "Your Products" so we can download it easily when you update it?

You are welcome!

I am afraid listing Core in the Client area would require some updates to the software, but we will do so as soon as we find some spare time.

Thank you!
 
I have a single thread by a user that has attached a screenshot of a blog post. So the resulting thumbnail is of course like this:

1624399770747.png

How can I remove the thumbnail without deleting the thread attachment, which is needed by the user's question?
 
So I assume there is no way to achieve this.

@AddonsLab could you think about adding this option in the thumbnail popup selector?
It would be useful to have a button to set "No thumbnail for this thread" beside the attachments. For now you can only use the bin icon which will delete the file but it does affect the thread attachments also!
 
Back
Top Bottom