Advertisement:

Author Topic: report email to a selected/all administrator(s) fails  (Read 1255 times)

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,117
  • Gender: Male
  • "mods" junkie
    • dopetalk
report email to a selected/all administrator(s) fails
« on: October 07, 2017, 12:32:10 PM »
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

Code: [Select]
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.

« Last Edit: October 07, 2017, 12:52:57 PM by aegersz »
SMF 2.0: 135+ mods installed (the full list can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,117
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: report email to a selected/all administrator(s) fails
« Reply #1 on: October 07, 2017, 01:55:32 PM »
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 ...



SMF 2.0: 135+ mods installed (the full list can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Online Steve

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 3,936
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: report email to a selected/all administrator(s) fails
« Reply #2 on: October 07, 2017, 02:40:16 PM »
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.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,105
  • 'Tis the gift to be simple
Re: report email to a selected/all administrator(s) fails
« Reply #3 on: October 07, 2017, 04:10:44 PM »
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?

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,117
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: report email to a selected/all administrator(s) fails
« Reply #4 on: October 07, 2017, 05:58:58 PM »
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.
SMF 2.0: 135+ mods installed (the full list can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,105
  • 'Tis the gift to be simple
Re: report email to a selected/all administrator(s) fails
« Reply #5 on: October 07, 2017, 06:17:38 PM »
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.

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,117
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: report email to a selected/all administrator(s) fails
« Reply #6 on: October 07, 2017, 07:02:36 PM »
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
« Last Edit: October 07, 2017, 07:56:21 PM by aegersz »
SMF 2.0: 135+ mods installed (the full list can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,117
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: report email to a selected/all administrator(s) fails
« Reply #7 on: October 07, 2017, 08:10:13 PM »
silly me, i had removed EMS in testing, that's why it works.
SMF 2.0: 135+ mods installed (the full list can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,117
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: report email to a selected/all administrator(s) fails
« Reply #8 on: October 07, 2017, 10:49:29 PM »
the code that is reported in error was created by the "PM Attachments" mod.
SMF 2.0: 135+ mods installed (the full list can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,433
    • XPtsp.com Community
Re: report email to a selected/all administrator(s) fails
« Reply #9 on: October 10, 2017, 11:22:13 AM »
Can you attach your Sources/Subs-Post.php file so that I can see what is going on there?
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,117
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: report email to a selected/all administrator(s) fails
« Reply #10 on: October 14, 2017, 06:51:31 AM »
Thanks dougie but don't waste too much time on it, just if you can see anything obvious ... sorry about the delay.
SMF 2.0: 135+ mods installed (the full list can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,433
    • XPtsp.com Community
Re: report email to a selected/all administrator(s) fails
« Reply #11 on: October 14, 2017, 11:14:19 AM »
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....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,117
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: report email to a selected/all administrator(s) fails
« Reply #12 on: October 14, 2017, 01:09:24 PM »
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.
SMF 2.0: 135+ mods installed (the full list can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)