[SOLVED] Error No SCALAR param in Bind! in ArticleCreate

Moderator: crythias

Locked
FDN
Znuny newbie
Posts: 7
Joined: 13 Oct 2011, 10:43
Znuny Version: 3.0.10
Real Name: Fabrice DONDON
Company: METRIXWARE

[SOLVED] Error No SCALAR param in Bind! in ArticleCreate

Post by FDN »

Hi,

I want to import e-mails in tickets.
While creating articles for e-mail in my test environment, I get the following error "Message: No SCALAR param in Bind!".

Code: Select all

Traceback (16336): 
   Module: Kernel::System::Ticket::Article::ArticleCreate (v1.327) Line: 264
   Module: main::otrs_importMessage (unknown version) Line: 462
Here is an extract of the code I use.

Code: Select all

my $otrsArticleID = $otrsTicket->ArticleCreate(
		TicketID         => $otrsId,
		ArticleType      => getArticleTypeForOtrs($msg),
		SenderType       => getSenderTypeForOtrs($msg),
		From             => $msg->sender->address,
		Subject          => decode_mimewords($msg->subject),
		Body             => $msgParts{body},
		ContentType      => $msgParts{bContentType},      
		HistoryType      => getHistoryTypeForOtrs($msg),
		HistoryComment	 => getArticleTypeForOtrs($msg)." from ".$msg->sender->address,
		UserID           => $OTRS_DEFAULT_OWNER_ID,
		NoAgentNotify    => 0,                              
		AutoResponseType => "auto reply"                    
    );
Can you please give me a way to find what's wrong with my code ?
I've watched quickly the Kernel/System/DB.pm code, but I couldn't what raised that error.
Last edited by FDN on 19 Feb 2013, 17:21, edited 2 times in total.
OTRS 3.0.10 in production with Mysql -
OTRS 3.2.1 in test with Mysql - perl v5.10.1
CentOS 6.3
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Error No SCALAR param in Bind! in ArticleCreate

Post by crythias »

Without additional information, it appears you're passing an array/hash/null where a scalar (string/number) is required.
More to the point, how can you get a history type on a message you are creating?
Even more explicitly: assign one.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
FDN
Znuny newbie
Posts: 7
Joined: 13 Oct 2011, 10:43
Znuny Version: 3.0.10
Real Name: Fabrice DONDON
Company: METRIXWARE

Re: Error No SCALAR param in Bind! in ArticleCreate

Post by FDN »

crythias wrote:Without additional information, it appears you're passing an array/hash/null where a scalar (string/number) is required.
More to the point, how can you get a history type on a message you are creating?
Even more explicitly: assign one.
Thanks for your advice. While waiting for your answer, I was modifying DB.pm to get a clue for finding my error.
I finally found that the subject was passed as an array.

Thanks for your help.

Regards
OTRS 3.0.10 in production with Mysql -
OTRS 3.2.1 in test with Mysql - perl v5.10.1
CentOS 6.3
Locked