Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Saftek on August 19, 2022, 03:14:57 PM

Title: PMat_CreateAttachment could not be called
Post by: Saftek on August 19, 2022, 03:14:57 PM
v2.1.2

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.

BACKTRACE:

#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?

Thanks.
Title: Re: PMat_CreateAttachment could not be called
Post by: vbgamer45 on August 19, 2022, 03:49:10 PM
What mods do you have installed?
Title: Re: PMat_CreateAttachment could not be called
Post by: Saftek on August 19, 2022, 04:05:06 PM
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 (idesignSMF.com)
Title: Re: PMat_CreateAttachment could not be called
Post by: Doug Heffernan on August 19, 2022, 04:15:20 PM
Did you have any mods installed recently that modified the attachment system?
Title: Re: PMat_CreateAttachment could not be called
Post by: Saftek on August 19, 2022, 04:24:22 PM
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.
Title: Re: PMat_CreateAttachment could not be called
Post by: Doug Heffernan on August 19, 2022, 04:39:25 PM
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.
Title: Re: PMat_CreateAttachment could not be called
Post by: Saftek on August 19, 2022, 05:18:09 PM
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.
Title: Re: PMat_CreateAttachment could not be called
Post by: Saftek on August 19, 2022, 06:21:56 PM
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.
Title: Re: PMat_CreateAttachment could not be called
Post by: Doug Heffernan on August 20, 2022, 04:11:57 AM
Glad to see that you got it soled.