• Welcome to Simple Machines Community Forum. Please login or sign up.

report email to a selected/all administrator(s) fails

Started by aegersz, October 07, 2017, 12:32:10 PM

Previous topic - Next topic

aegersz

October 07, 2017, 12:32:10 PM Last Edit: October 07, 2017, 12:52:57 PM by aegersz
report email to a selected/all administrator(s) fails

error:
Wrong value type sent to the database. Array of integers expected. (attach_ids)

log:
https://mysite/index.php?action=pm;sa=report;l=-1
Wrong value type sent to the database. Array of integers expected. (attach_ids)
Function: sendpm
File: /var/www/html/Sources/Subs-Post.php
Line: 961

if (count($attachments) >= 1)
948: {
949: $parent_attachments = array();
950:
951: $request = $smcFunc['db_query']('', '
952: SELECT
953: id_attach
954: FROM {db_prefix}pm_attachments
955: WHERE id_attach IN ({array_int:attach_ids})
956: AND attachment_type = {int:not_thumb}',
957: array(
958: 'attach_ids' => $attachments,
959: 'not_thumb' => 0,
960: )
==>961: );


sorry, this is not an SMF problem as it works in vanilla. I will try to figure out which mod is causing this.

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

it was the Enhanced PM System mod (dougiefresh) that caused this but the mod is now gone so i'm not sure where you can move this post to (?)

I will PM dougiefresh and ask him what i should do.

Maybe you can move this to the Mods board ...



The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Steve

Since the mod board is for specific mod support threads I'm inclined to just leave it here. More experienced team members may have a better idea.
Please do not PM me for support.

Sir Osis of Liver

That's not core code, it's from a mod.  Enhanced PM System was pulled by dougie, it's no longer on mod site.  Where did you get it?
"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

aegersz

I got it ages when it was made available and I think I am on the last release.

my system is too complex to undo it so I will live with this bug unless dougie can help.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Sir Osis of Liver

If you can identify the code in Subs-Post.php as being from that mod, you can try deleting it.  Can't parse the mod, it's not on mod site, but if you have the patience you can unzip the package and see if you can determine which code was left behind when it uninstalled.
"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

aegersz

October 07, 2017, 07:02:36 PM #6 Last Edit: October 07, 2017, 07:56:21 PM by aegersz
the mod is still installed and maybe I can try to fix it but it would take a lot of time to figure out what's going on.

I have PMed dougie asking for his advice, I'm hoping he can help me to make the appropriate changes even though the mod is unsupported.

the "Message" function has been modified to allow attachments.

I am quite happy with the EMS but it just has this bug which bothers me.

the function works ONLY in the test  system (weird?) if you add an attachment to the PM that you want to report to Admin
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

silly me, i had removed EMS in testing, that's why it works.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

the code that is reported in error was created by the "PM Attachments" mod.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

Can you attach your Sources/Subs-Post.php file so that I can see what is going on there?

aegersz

Thanks dougie but don't waste too much time on it, just if you can see anything obvious ... sorry about the delay.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

The code in question comes from the PM attachments mod.  Considering it works without the EPM mod, it is unlikely that the code itself is wrong.  It's more probable that another function is calling the sendpm function with wrong arguments, which (unfortunately) is possible since the code makes alterations to the function declaration....  Without knowing what function is calling the sendpm function incorrectly, I can't even guess at which file to look at next....

aegersz

no problem.

thanks for looking into it ... i have never had to use it and nobody has mentioned it to me so i can live quite happily without this function, anyway.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Geor'G

Quick fix.
In the file Subs-Post.php, find:
$str_attachments = '';

if (count($attachments) >= 1)


Replace:

$str_attachments = '';

if(!is_array($attachments))
$attachments = array();

if (count($attachments) >= 1)

aegersz

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Advertisement: