PMat_CreateAttachment could not be called

Started by Saftek, August 19, 2022, 03:14:57 PM

Previous topic - Next topic



When I insert attachments into post, I get error:

Hook call: "PMat_CreateAttachment" in file xxx/public_html/forum could not be called.

I get two related error messages every time an attachment is added.

The attachment is inserted into the post.


#0: call_integration_hook()
Called from /home/xxxx/public_html/forum/Sources/Subs-Attachments.php on line 749
#1: createAttachment()
Called from /home/xxxx/public_html/forum/Sources/Attachments.php on line 414
#2: createAttach()
Called from /home/xxxx/public_html/forum/Sources/Attachments.php on line 205
#3: add()
Called from /home/xxxx/public_html/forum/Sources/Attachments.php on line 139
#4: call()
Called from /home/xxxx/public_html/forum/index.php on line 191

Any ideas on what is causing this and how to fix?



Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more! -  Paid Modifications for SMF

EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro


SMF Classifieds
SMF Gallery Pro
SMF Gallery Pro Profile Link
SMF Store
Stop Forum Spam
Mod Version Checker
Simple Audio Video Embedder
Awesome Post Ratings
Clean Talk Antispam
RSS Feed Poster

Current Theme - Fusion (

Doug Heffernan

Did you have any mods installed recently that modified the attachment system?


Just did a quick file comparison and there are no differences between the 2.1.2 installation files and the current files - Attachments.php and Subs-Attachments.php.

Doug Heffernan

Quote from: Saftek on August 19, 2022, 04:24:22 PMAll these mods were installed/updated between April and August. The list is in chronological order latest to earliest.

The problem is caused by a custom function (PMat_CreateAttachment) loaded by a hook, which should be present, but it seems to not be.

I am not familiar with either of the mods that you listed. You must check them to see which one has added the aforementioned function.


I think the problem may be Simple Audio Video Embedder. Uninstall throws errors, so I have to manually uninstall. I will update when I get this done.


okay, the problem was Simple Audio Video Embedder. Apparently, it didn't install correctly. I have used this through several versions. I had to manually uninstall, since the code the uninstaller looked for didn't exist. I reinstalled and the error is no longer thrown.