What's new
[XB] Change Attachment Name

[XB] Change Attachment Name [Paid] 2.0.5 Patch Level 1

You must log in or register to purchase ($20.00)
Hi Painbaker!

I've been very busy making changes to my forum but today I installed the add-on. It works just fine and it's great. But I am getting the odd server error, see below.

I thought I'd report it.

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

    Generated by: Levina de Ruijter 18 January 2026 at 21:28

Stack trace

#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', 's...', 1267)
#1 src/XF/Template/Templater.php(1267): 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(1799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#4 src/XF/BbCode/Renderer/Html.php(1270): XF\Template\Templater->renderTemplate('bb_code_tag_quo...', Array)
#5 src/XF/BbCode/Renderer/Html.php(1214): XF\BbCode\Renderer\Html->getRenderedQuote('Wojtek the Sold...', 'Levina de Ruijt...', Array, Array)
#6 src/XF/BbCode/Renderer/Html.php(356): XF\BbCode\Renderer\Html->renderTagQuote(Array, 'Levina de Ruijt...', Array, Array, Object(s9e\MediaSites\XF\BbCode\Renderer\Html))
#7 src/addons/s9e/MediaSites/XF/BbCode/Renderer/Html.php(17): XF\BbCode\Renderer\Html->renderTag(Array, Array)
#8 src/XF/BbCode/Traverser.php(63): s9e\MediaSites\XF\BbCode\Renderer\Html->renderTag(Array, Array)
#9 src/XF/BbCode/Traverser.php(39): XF\BbCode\Traverser->renderSubTree(Array, Array)
#10 src/XF/BbCode/Traverser.php(22): XF\BbCode\Traverser->renderAst(Array, Object(XF\BbCode\RuleSet), Array)
#11 src/XF/SubContainer/BbCode.php(236): XF\BbCode\Traverser->render('[QUOTE="Levina ...', Object(XF\BbCode\Parser), Object(XF\BbCode\RuleSet), Array)
#12 src/XF/Template/Templater.php(2619): XF\SubContainer\BbCode->render('[QUOTE="Levina ...', 'html', 'post', Object(TickTackk\ChangeContentOwner\XF\Entity\Post), Array)
#13 src/XF/Template/Templater.php(1219): XF\Template\Templater->fnBbCode(Object(SV\StandardLib\XF\Template\Templater), false, '[QUOTE="Levina ...', 'post', Object(TickTackk\ChangeContentOwner\XF\Entity\Post))
#14 src/addons/PB/ChangeAttachmentName/XF/Entity/Post.php(11): XF\Template\Templater->func('bb_code', Array)
#15 src/addons/PB/ChangeAttachmentName/ControllerPlugin/Attachment.php(55): PB\ChangeAttachmentName\XF\Entity\Post->getAttachmentRenamePreviewMessage()
#16 src/addons/PB/ChangeAttachmentName/XF/Admin/Controller/Attachment.php(21): PB\ChangeAttachmentName\ControllerPlugin\Attachment->actionRename(Object(XFMG\XF\Entity\Attachment), '/admin.php?atta...')
#17 src/XF/Mvc/Dispatcher.php(362): PB\ChangeAttachmentName\XF\Admin\Controller\Attachment->actionRename(Object(XF\Mvc\ParameterBag))
#18 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Attachment', 'Rename', Object(XF\Mvc\RouteMatch), Object(PB\ChangeAttachmentName\XF\Admin\Controller\Attachment), NULL)
#19 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(PB\ChangeAttachmentName\XF\Admin\Controller\Attachment), NULL)
#20 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#21 src/XF/App.php(2824): XF\Mvc\Dispatcher->run()
#22 src/XF.php(806): XF\App->run()
#23 admin.php(15): XF::runApp('XF\\Admin\\App')
#24 {main}

Request state

array(4) {
  ["url"] => string(200) "/admin.php?attachments/img_6643_-copy-webp.76454/rename&_xfResponseType=json&_xfWithData=1&_xfRequestUri=%2Fadmin.php%3Fattachments%2F%26page%3D9&_xfToken=1768767867%2C7b90b028183adde2e2dbc3b4463a094a"
  ["referrer"] => string(62) "https://photographers-on-the.net/admin.php?attachments/&page=9"
  ["_GET"] => array(5) {
    ["attachments/img_6643_-copy-webp_76454/rename"] => string(0) ""
    ["_xfResponseType"] => string(4) "json"
    ["_xfWithData"] => string(1) "1"
    ["_xfRequestUri"] => string(30) "/admin.php?attachments/&page=9"
    ["_xfToken"] => string(43) "1768767867,7b90b028183adde2e2dbc3b4463a094a"
  }
  ["_POST"] => array(0) {
  }
}
Should be fixed in last update

Also, I'm wondering if it would be possible to position the little pencil on the thumbnails elsewhere, say in the lower left or lower right corner. It is now frightfully close to the trash bin and sure enough I just accidentally deleted an image. And once gone, it's gone, can't retrieve it.


I added an option to put the edit button here:

1769109509808.webp
options.webp

Yes, that would work too. Right now it's too easy to delete a pic.

And there is another problem I ran into today. I received DM's from members whose pics were gone from their posts. Turned out the thumbnails were still there, but the photos were missing from the post, so I just inserted them again. It happened in just a few posts, but this is bad. I can't edit the titles and then having to check if the images are still present in the posts.

I believe that the text of these messages contained incorrect BB codes ATTACH with attributes in the wrong order.
I made a change in the latest patch to handle such cases correctly.
 
I think an important feature would be the ability to rename all attachments via cron using variables like those in the "Auto Title & Alt Image Attributes" add-on.

This way, thousands of attachments could be renamed, for example: {site} {title} {date}


1769937203851.webp
 
@Painbaker The error that was showing the extension is still appearing in XFMG.

I edited a name from the thread. In the thread, it displays correctly without the extension, but in XFMG, it appears with .wepb.
 
@PhineasD That's funny, it's exactly the opposite on my forum. The extension does show in the filename in the thread and in the metadata in the Gallery, which I think is helpful for the good bots so they know it's an image. But it is gone from the XF title field so you get a nice clean URL. For me this is perfect.

One thing is that when I post an image and change the filename, then submit the post, the extension shows both in the thread and in the XF title field. But if I edit my post and change the name, the extension shows in the thread but not in the XF title field. It's not a problem for me though. I just submit my post, click on edit, change the filename, cancel. And now there's no extension in the Gallery title field.
 
What I'm looking for is that when I edit the name of an attachment and I have enabled the option to not show the extension, in XFMG it doesn't show the page title with the name and the extension.
 
Could the button for changing the name on the XFMG page be added in the same location as the Report, Edit, Delete, etc. buttons? It would be very useful for editing names directly from the gallery.
 
Back
Top