Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: MultiformeIngegno on November 12, 2009, 09:40:29 AM

Title: Problem with search in Admin Center
Post by: MultiformeIngegno on November 12, 2009, 09:40:29 AM
Hello! :)
When I search something in the Admin Center I receive this error:
Fatal error: Cannot use string offset as an array in /public_html/forum/Sources/ManageMail.php  on line 287

:(
Title: Re: Problem with search in Admin Center
Post by: Oldiesmann on November 12, 2009, 11:54:44 AM
What are you searching for? I've never run into that issue, and I can't see anything on that particular line that would cause the error.

Does this fix it at all?

Sources/ManageMail.php

Find
Code (Lines 286-287) Select
$body = $birthdayEmails[empty($modSettings['birthday_email']) ? 'happy_birthday' : $modSettings['birthday_email']]['body'];
$subject = $birthdayEmails[empty($modSettings['birthday_email']) ? 'happy_birthday' : $modSettings['birthday_email']]['subject'];


Replace
if (empty($modSettings['birthday_email']))
{
$modSettings['birthday_email'] = 'happy_birthday';
}
$body = $birthdayEmails[$modSettings['birthday_email']]['body'];
$subject = $birthdayEmails[$modSettings['birthday_email']]['subject'];
Title: Re: Problem with search in Admin Center
Post by: MultiformeIngegno on November 12, 2009, 12:44:43 PM
Quote from: Oldiesmann on November 12, 2009, 11:54:44 AM
What are you searching for? I've never run into that issue, and I can't see anything on that particular line that would cause the error.
It occurs every time I use the Admin Center search box, and I'm not using strange characters, I receive it also if I search "abc"...

Quote from: Oldiesmann on November 12, 2009, 11:54:44 AM
Does this fix it at all?
No... nothing changes.. :(
Title: Re: Problem with search in Admin Center
Post by: Fabius85 on November 19, 2009, 10:25:24 PM
i get the same error whenever i click on Mail > Settings in the admin panel...
Title: Re: Problem with search in Admin Center
Post by: Arantor on November 19, 2009, 10:51:27 PM
What mods do you have installed?
Title: Re: Problem with search in Admin Center
Post by: Fabius85 on November 20, 2009, 06:29:34 AM
Quote from: Arantor on November 19, 2009, 10:51:27 PM
What mods do you have installed?
only recaptcha, but i dont think the problem depends on it :-\
Title: Re: Problem with search in Admin Center
Post by: Arantor on November 20, 2009, 08:13:27 AM
It might do if it adds anything to the admin panel.
Title: Re: Problem with search in Admin Center
Post by: MultiformeIngegno on November 20, 2009, 08:16:30 AM
Quote from: Arantor on November 20, 2009, 08:13:27 AM
It might do if it adds anything to the admin panel.
I don't have ReCaptcha installed, only SimplePortal, Sitemap and Aeva...
Title: Re: Problem with search in Admin Center
Post by: Arantor on November 20, 2009, 08:17:11 AM
Same answer. It may well be any/all of those mods that affect it.
Title: Re: Problem with search in Admin Center
Post by: Fabius85 on November 20, 2009, 09:24:16 AM
Quote from: Arantor on November 20, 2009, 08:17:11 AM
Same answer. It may well be any/all of those mods that affect it.
just tried uninstalling recaptcha mod. so there were no mods on my forum: the problem persists.
Title: Re: Problem with search in Admin Center
Post by: Beagleboys on November 20, 2009, 09:36:19 AM
it's not a mod problem. i have all those mod installed(excluding simpleportal) and my SMF work fine.
Title: Re: Problem with search in Admin Center
Post by: Arantor on November 20, 2009, 09:36:33 AM
OK.... so what version of SMF 2.0 ?
Title: Re: Problem with search in Admin Center
Post by: MultiformeIngegno on November 20, 2009, 09:46:58 AM
Quote from: Arantor on November 20, 2009, 09:36:33 AM
OK.... so what version of SMF 2.0 ?
Mine is RC2... all worked properly in earlier versions...
Title: Re: Problem with search in Admin Center
Post by: Fabius85 on November 20, 2009, 11:24:07 AM
Quote from: Arantor on November 20, 2009, 09:36:33 AM
OK.... so what version of SMF 2.0 ?
RC2 for me too
Title: Re: Problem with search in Admin Center
Post by: Beagleboys on November 20, 2009, 11:59:13 AM
did you tried to replace ManageMail.php with the original that you can find in an original package of SMF?
Title: Re: Problem with search in Admin Center
Post by: Fabius85 on November 20, 2009, 01:26:42 PM
Quote from: Beagleboys on November 20, 2009, 11:59:13 AM
did you tried to replace ManageMail.php with the original that you can find in an original package of SMF?
yep, however the file was the original one, it was never edited after installation.
problem persists...
Title: Re: Problem with search in Admin Center
Post by: MultiformeIngegno on November 20, 2009, 02:52:41 PM
Quote from: Fabius85 on November 20, 2009, 01:26:42 PM
Quote from: Beagleboys on November 20, 2009, 11:59:13 AM
did you tried to replace ManageMail.php with the original that you can find in an original package of SMF?
yep, however the file was the original one, it was never edited after installation.
problem persists...

Same here...
Title: Re: Problem with search in Admin Center
Post by: Norv on November 21, 2009, 09:26:50 AM
What version of PHP are you on?
Please check it out in phpMyAdmin ("server" link), or post a phpinfo() file.
Title: Re: Problem with search in Admin Center
Post by: Basile Sebastiano on November 21, 2009, 11:39:40 AM
Quote from: lorenzone92 on November 12, 2009, 09:40:29 AM
Hello! :)
When I search something in the Admin Center I receive this error:
Fatal error: Cannot use string offset as an array in /public_html/forum/Sources/ManageMail.php  on line 287

I am the some problem in:
Admin center > mail > setting
I Use RC2 in this server: www.2bmanzoni.netsons.org/info.php
Title: Re: Problem with search in Admin Center
Post by: toretto86 on November 23, 2009, 03:49:27 PM
Quote from: russena on November 21, 2009, 11:39:40 AM

I am the some problem in:
Admin center > mail > setting
I Use RC2 in this server: www.2bmanzoni.netsons.org/info.php

Idem for http://secretland.netsons.org/forum/index.php
and i have some problems with activation emails (no send AE to hotmail users)
Title: Re: Problem with search in Admin Center
Post by: MultiformeIngegno on November 23, 2009, 04:36:21 PM
Quote from: Norv on November 21, 2009, 09:26:50 AM
What version of PHP are you on?
Please check it out in phpMyAdmin ("server" link), or post a phpinfo() file.
5.2.11

http://www.rockciclopedia.com/phpinfo.php
Title: Re: Problem with search in Admin Center
Post by: Beagleboys on November 23, 2009, 05:33:46 PM
everyone had the same problem with netsons? maybe is the host...
Title: Re: Problem with search in Admin Center
Post by: MultiformeIngegno on November 23, 2009, 06:10:15 PM
Quote from: Beagleboys on November 23, 2009, 05:33:46 PM
everyone had the same problem with netsons? maybe is the host...
But.... are you blind..? Please look at my post just above yours...
Title: Re: Problem with search in Admin Center
Post by: Beagleboys on November 24, 2009, 05:08:53 AM
Quote from: lorenzone92 on November 23, 2009, 06:10:15 PM
Quote from: Beagleboys on November 23, 2009, 05:33:46 PM
everyone had the same problem with netsons? maybe is the host...
But.... are you blind..? Please look at my post just above yours...
First of all: Sta buono. If you want help at least be nice or call someone that have time to lose while you insult him. I've missed your post because it was in a new page. And the fact that you have a second level domain don't exclude that you are on netsons.

Second: You have nothing related to this in the forum error log?

Third: i have php 5.0.82sp1 and no error... maybe this is the error...
Title: Re: Problem with search in Admin Center
Post by: Arantor on November 24, 2009, 05:13:14 AM
A quick rDNS shows they're on SilentFlame, quite different to netsons.
Title: Re: Problem with search in Admin Center
Post by: Beagleboys on November 24, 2009, 05:23:43 AM
well, a deep check and i've discovered that phpmyadmin and mysql are on different server with different php versions.
I've spot a difference with the phpinfo posted by a user and the mine. The user had sendmail_from empty and i have a value here. Maybe that generate the error?
Title: Re: Problem with search in Admin Center
Post by: Basile Sebastiano on November 24, 2009, 08:16:43 AM
Quote from: Beagleboys on November 23, 2009, 05:33:46 PM
everyone had the same problem with netsons? maybe is the host...
The same with Aruba host windows
www.avolesi.it
php info
http://www.avolesi.it/info.php
Title: Re: Problem with search in Admin Center
Post by: Beagleboys on November 24, 2009, 10:06:29 AM
Quote from: russena on November 24, 2009, 08:16:43 AM
Quote from: Beagleboys on November 23, 2009, 05:33:46 PM
everyone had the same problem with netsons? maybe is the host...
The same with Aruba host windows
www.avolesi.it
php info
http://www.avolesi.it/info.php
i'm on aruba but linux not windows. I have no problem at all. Ask to switch.
Title: Re: Problem with search in Admin Center
Post by: Basile Sebastiano on November 24, 2009, 02:35:38 PM
No, because I need to use script Asp (visubox end other)
Title: Re: Problem with search in Admin Center
Post by: toretto86 on November 26, 2009, 07:29:58 AM
any solution???
Title: Re: Problem with search in Admin Center
Post by: Fabius85 on November 28, 2009, 12:41:56 AM
there are some bugs in the italian template of EmailTemplates.italian.php:
$birthdayEmails array is repeated 2 times (the old array with a single mail, and the new one with different birthday mails to send).
the ' quotes in the arrays are ALL wrongly preceded by \ slashes so the array would never work.
and some parts of the translations are missing, so that, for example, registering a new user by admin panel returns a "template missing" error.
I made the necessary changes to the template: i fixed the birthday mail array and translated all the missing arrays (which were about 10, regarding almost openID and coppa registrations). I also corrected 2 or 3 translation errors in birthday mails

Here it is a FULLY WORKING EmailTemplates.italian.php.
http://pastie.org/717909

Simply replace the code of EmailTemplates.italian.php which you can find in /Themes/default/languages with the code i posted here.

I hope i'm gonna get some credits in the next italian translations ;D

Regards,
Fabius
Title: Re: Problem with search in Admin Center
Post by: MultiformeIngegno on November 28, 2009, 08:03:49 AM
Thanks, italian translation updated... :)
Solved.
Title: Re: Problem with search in Admin Center
Post by: Basile Sebastiano on November 28, 2009, 09:03:19 AM
Thanks. No problem now.
Title: Re: Problem with search in Admin Center
Post by: toretto86 on November 29, 2009, 07:50:09 AM
Tnx a lot :)