News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

I get an error when sending a personal message

Started by akaewn, March 19, 2013, 12:54:46 PM

Previous topic - Next topic

akaewn

I get an error when sending a personal message


database Error
Unknown column 'pm.id_pm_head' in 'field list'
Dosya: /home/efsanewe/public_html/Sources/PersonalMessage.php
line: 737

Mr. Pedram

My Modifications:
» Loading For SMF
» Buddies Block
» Redirect Links
» Birthdate On Registration
» PM Warning
» Instagram
» Add Table,Td,Tr Button
» Search Topic & Board Button
Browse All...

akaewn

I do not remember.
situation that is, the database resource-related

something there can be deleted

Mr. Pedram

If you got error from database, that means probably you've did a change or installed a bad mod!
My Modifications:
» Loading For SMF
» Buddies Block
» Redirect Links
» Birthdate On Registration
» PM Warning
» Instagram
» Add Table,Td,Tr Button
» Search Topic & Board Button
Browse All...

akaewn


Mr. Pedram

Ok, so clean your change to solve your problem.
My Modifications:
» Loading For SMF
» Buddies Block
» Redirect Links
» Birthdate On Registration
» PM Warning
» Instagram
» Add Table,Td,Tr Button
» Search Topic & Board Button
Browse All...

akaewn

here is the database of hard work
I can not do anything to spare did not get.

There was a lot of code to the database mistakes have read, solved a similar
but I could not figure out

Mr. Pedram

Quote from: efsaneweb on March 19, 2013, 04:19:58 PM
here is the database of hard work
I can not do anything to spare did not get.

There was a lot of code to the database mistakes have read, solved a similar
but I could not figure out

Well, something is wrong with your database code, so head to this board "SMF Coding Discussion" and request for help from Developers.
My Modifications:
» Loading For SMF
» Buddies Block
» Redirect Links
» Birthdate On Registration
» PM Warning
» Instagram
» Add Table,Td,Tr Button
» Search Topic & Board Button
Browse All...

Kindred

well, I might also note that pm.id_pm_head is not a valid SMF table/column for a standard installation....


so, your code is looking for a column called is_pm_head in a table called pm -- which apparently does not exist.

You need to ask the author of whatever mod you are using...
or check with whoever wrote the code for you... because it was written wrongly.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

akaewn

my use mod..


1.    Add Attachment Ad    1.0    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
2.    Alert    v.1.0    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
3.    Registered Links and Images    3.0    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
4.    Thank-o-matic    3.0    [ Modifikasyonu Yükle ] [ Dosyaları Listele ] [ Sil ]
5.    Adk Personal Icon forums    1.0    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
6.    Simple Audio Video Embedder    2.0.7a    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
7.    Seo 4 SMF 2.0    3.1.6    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
8.    markItUp! for SMF    0.5.2    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
9.    Multiple Stars    V1    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
10.    Slashout Banned Members    1.2    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
11.    Simple Menu Icons    1.0    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
12.    Aligned and Bilateral Child Boards    1.5    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
13.    Adk bbcTorrent    1.0    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
14.    Seo Hhy    1.1    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
15.    Hide Tag Special    3.0    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
16.    Efsaneweb.com | Hizli Yanit Ac    2.0.x    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
17.    Google Tagged    2.0    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
18.    Thank-O-Matic    1.2.5    [ Dosyaları Listele ] [ Sil ]
19.    nCode Image Resizer    1.3.2    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
20.    RSS Feed Icon    1.1    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
21.    Uye Link Renkleri    3.0.9.1    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
22.    Quote and code like vb4    1.0    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
23.    Board Viewers Mod    1.2.1.1b    [ Kaldır ] [ Dosyaları Listele ] [ Sil ]
24.    H1 Tags in link tree

Kindred

and, as we have noted before... several of those mods are not from our mod site --   and we have noted that they are KNOWN to be poorly coded.


I have no idea which of those mods added a call to a non-existant table...   but you really need to follow up with the mod author(s).
If they don't submit mods to our site for review, we can't even start trying to help...   and even when they do, questions related to a specific mod breaking your site don't belong in general support, they need to be addressed to the author.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

akaewn


Kindred

you have completely missed the point.

Some mod that you installed, or other custom code edit, has your system looking for a column called is_pm_head in a table called pm -- which apparently does not exist.

So, whatever mod or code edit it was is INCORRECTLY calling for a NON-EXISTANT table and column.

Your first bet would be to look in PersonalMessage.php, around line 737
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

akaewn

Quote from: Kindred on March 20, 2013, 11:00:44 AM
you have completely missed the point.

Some mod that you installed, or other custom code edit, has your system looking for a column called is_pm_head in a table called pm -- which apparently does not exist.

So, whatever mod or code edit it was is INCORRECTLY calling for a NON-EXISTANT table and column.

Your first bet would be to look in PersonalMessage.php, around line 737

line 737
);

Kindred

Oh, for the love of gods...

...around line 737


In other words, we ar elooking for the section of code which is calling for the invalid table.
since line 737 is a closing parens (which was expected, actually) what is BEFORE THAT in the array or SQL function which os calling for the table... and that is AFTER THAT which is trying to USE that pulled information.

I repeat...   that call is NOT a standard part of SMF, which means that some mod or custom coding added it.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

akaewn

:((

TABLE I remove personal message
I installed it again from someone else
may be a problem

Kindred

what?

Why would you remove a standard table that SMF depends on?

However, I will repeat, one more time...

the issue is that you have some code calling for a table which does not exist. period.
I don't know why you have that code because you won't show me the code that is calling for it....
On top of all that, you have mods which are known to have major issues installed.

Quote from: Kindred on March 20, 2013, 12:45:15 PM
In other words, we are looking for the section of code which is calling for the invalid table.
since line 737 is a closing parens (which was expected, actually) what is BEFORE THAT in the array or SQL function which os calling for the table... and that is AFTER THAT which is trying to USE that pulled information.

I repeat...   that call is NOT a standard part of SMF, which means that some mod or custom coding added it.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

akaewn

members_color_link_204

This mode is only for changes personalmessage.php

Kindred

for the love of all bloody gods, can you not answer a clear question?

Don't tell me what you think I want to read. Tell me the answer to the question that I asked.
I want to know what code is around 737

one last time, in plain english... copy/paste the code for 20 lines before and 10 lines AFTER line 737.




also, members_olor_ink_04 is not a valid mod from this site...
the closest is member_color_link_3_1
I suggest that you check on whatever site your downloaded those mods from...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

akaewn

#19
      // !!!SLOW This query uses a filesort. (inbox only.)
      $request = $smcFunc['db_query']('', '
         SELECT pm.id_pm, pm.id_pm_head, pm.id_member_from
         FROM {db_prefix}personal_messages AS pm' . ($context['folder'] == 'sent' ? '' . ($context['sort_by'] == 'name' ? '
            LEFT JOIN {db_prefix}pm_recipients AS pmr ON (pmr.id_pm = pm.id_pm)' : '') : '
            INNER JOIN {db_prefix}pm_recipients AS pmr ON (pmr.id_pm = pm.id_pm
               AND pmr.id_member = {int:current_member}
               AND pmr.deleted = {int:is_deleted}
               ' . $labelQuery . ')') . ($context['sort_by'] == 'name' ? ( '
            LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = {raw:pm_member})') : '') . '
         WHERE ' . ($context['folder'] == 'sent' ? 'pm.id_member_from = {raw:current_member}
            AND pm.deleted_by_sender = {int:is_deleted}' : '1=1') . (empty($pmsg) ? '' : '
            AND pm.id_pm = {int:pmsg}') . '
         ORDER BY ' . ($_GET['sort'] == 'pm.id_pm' && $context['folder'] != 'sent' ? 'pmr.id_pm' : '{raw:sort}') . ($descending ? ' DESC' : ' ASC') . (empty($pmsg) ? '
         LIMIT ' . $_GET['start'] . ', ' . $modSettings['defaultMaxMessages'] : ''),
         array(
            'current_member' => $user_info['id'],
            'is_deleted' => 0,
            'sort' => $_GET['sort'],
            'pm_member' => $context['folder'] == 'sent' ? 'pmr.id_member' : 'pm.id_member_from',
            'pmsg' => isset($pmsg) ? (int) $pmsg : 0,
         )
   [color=red]   ); line 737[/color]
   }
   // Load the id_pms and initialize recipients.
   $pms = array();
   $lastData = array();
   $posters = $context['folder'] == 'sent' ? array($user_info['id']) : array();
   $recipients = array();

   while ($row = $smcFunc['db_fetch_assoc']($request))
   {
      if (!isset($recipients[$row['id_pm']]))
      {
         if (isset($row['id_member_from']))
            $posters[$row['id_pm']] = $row['id_member_from'];
         $pms[$row['id_pm']] = $row['id_pm'];
         $recipients[$row['id_pm']] = array(
            'to' => array(),
            'bcc' => array()
         );
      }

      // Keep track of the last message so we know what the head is without another query!

Advertisement: