Advertisement:

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

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,509
  • 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 »
The configuration of my Linux VPS (SMF 2.0 with 145 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)

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,509
  • 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 ...



The configuration of my Linux VPS (SMF 2.0 with 145 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)

Online Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • 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.
Online Manual

Please do not PM me for support.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,311
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

  • SMF Hero
  • ******
  • Posts: 1,509
  • 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.
The configuration of my Linux VPS (SMF 2.0 with 145 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)

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,311
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

  • SMF Hero
  • ******
  • Posts: 1,509
  • 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 »
The configuration of my Linux VPS (SMF 2.0 with 145 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)

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,509
  • 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.
The configuration of my Linux VPS (SMF 2.0 with 145 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)

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,509
  • 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.
The configuration of my Linux VPS (SMF 2.0 with 145 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)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • 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?

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,509
  • 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.
The configuration of my Linux VPS (SMF 2.0 with 145 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)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • 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....

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,509
  • 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.
The configuration of my Linux VPS (SMF 2.0 with 145 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)

Offline Geor'G

  • Semi-Newbie
  • *
  • Posts: 62
Re: report email to a selected/all administrator(s) fails
« Reply #13 on: January 17, 2018, 03:24:03 PM »
Quick fix.
In the file Subs-Post.php, find:
Code: [Select]
$str_attachments = '';

if (count($attachments) >= 1)

Replace:
Code: [Select]
$str_attachments = '';

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

if (count($attachments) >= 1)

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,509
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: report email to a selected/all administrator(s) fails
« Reply #14 on: January 17, 2018, 05:04:01 PM »
yeah ? i will give it a try ... thanks mate !
The configuration of my Linux VPS (SMF 2.0 with 145 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)

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,509
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: report email to a selected/all administrator(s) fails
« Reply #15 on: January 19, 2018, 06:42:45 AM »
works well ! thanks again,
The configuration of my Linux VPS (SMF 2.0 with 145 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)