TinyPortal

Development => Support => Topic started by: ARG on November 23, 2011, 06:11:46 PM

Title: Creating New Boards
Post by: ARG on November 23, 2011, 06:11:46 PM
Since I installed TP I can no longer create boards.

associationamerica dot com
SMF 2.0.1
TP 1.104
English Language
Theme- Zentoa by Dziner Studio
Firefox 8.0
Only mod is Stop Forum Spam
Error message
QuoteIllegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation 'ifnull'
File: /home/public_html/Sources/TPortal.php
Line: 1116

TPortal.php lines 1088 to 1116
// fallback value
if(!isset($context['TPortal']['category']['options']['catlayout']))
$context['TPortal']['category']['options']['catlayout'] = 1;
$now = time();
$request =  $smcFunc['db_query']('', '
SELECT art.id, IF(art.useintro > 0, art.intro, art.body) AS body,
art.date, art.category, art.subject, art.author_id as authorID, art.frame, art.comments, art.options,
art.comments_var, art.views, art.rating, art.voters, art.shortname, art.useintro, art.intro,
art.fileimport, art.topic, art.illustration, IFNULL(art.type, "html") as rendertype ,IFNULL(art.type, "html") as type, art.global_tag,
IFNULL(mem.real_name, art.author) as realName, mem.avatar, mem.posts, mem.date_registered as dateRegistered,mem.last_login as lastLogin,
IFNULL(a.id_attach, 0) AS ID_ATTACH, a.filename, a.attachment_type as attachmentType
FROM {db_prefix}tp_articles AS art
LEFT JOIN {db_prefix}members AS mem ON (art.author_id = mem.id_member)
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = mem.id_member AND a.attachment_type != 3)
WHERE art.category = {int:cat}
AND ((art.pub_start = 0 AND art.pub_end = 0)
OR (art.pub_start !=0 AND art.pub_start < '.$context['tportal']['now'].' AND art.pub_end = 0)
OR (art.pub_start = 0 AND art.pub_end != 0 AND art.pub_end > '.$context['tportal']['now'].')
OR (art.pub_start != 0 AND art.pub_end != 0 AND art.pub_end > '.$context['tportal']['now'].' AND art.pub_start < '.$context['tportal']['now'].'))
AND art.off = 0
AND art.approved = 1
ORDER BY art.sticky desc, art.'.$catsort.' '.$catsort_order.'
LIMIT {int:start}, {int:max}',
array(
'cat' => $category['id'],
'start' => $start,
'max' => $max,
)
);



All boards created before TP was installed function and edit correctly. Just unable to create any additional boards.

;)
Title: Re: Creating New Boards
Post by: ARG on November 25, 2011, 03:17:57 AM
Anyone?  ;)
Title: Re: Creating New Boards
Post by: IchBin on November 25, 2011, 03:54:34 AM
On vacation right now. But if you search the boards for the error text youll see this has been asked a few times before. Your tables need to have the same collation.
Title: Re: Creating New Boards
Post by: ARG on November 25, 2011, 05:52:54 AM
Thanx IchBin. I was looking around and found a few posts. Most of my tables in phpMyAdmin are utf8_unicode_ci and only a few are utf8_general_ci

So, I need to change them all to be the same? And if so, does it matter which?

;)
Title: Re: Creating New Boards
Post by: IchBin on November 25, 2011, 04:53:49 PM
I think utf8_general is probably the one that SMF uses. If the majority of your tables are general instead of unicode I'd just make sure they were all general.
Title: Re: Creating New Boards
Post by: ARG on November 25, 2011, 06:17:28 PM
Actually all SMF tables are unicode by default and only the TP tables are general. So, if I change all TP tables to unicode it should fix things?

Also I just noticed that some categories will allow new boards, just not all categories. 
Title: Re: Creating New Boards
Post by: IchBin on November 28, 2011, 05:52:52 AM
Well I think by default SMF will use which ever your server does by default. But if you convert to UTF8 in the database maintenance section I think it users general. Anyway, just change the TP tables to the same as your SMF tables and see if it works. Make a backup before you do any changes like this though.
Title: Re: Creating New Boards
Post by: ARG on November 28, 2011, 06:44:08 AM
Thanx IchBin. I went ahead and changed them all to unicode and now it seems to work fine.

Much appreciated.  ;)
Title: Re: Creating New Boards
Post by: IchBin on November 29, 2011, 06:07:27 PM
Excellent, good to see you got it working.