TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,234
  • Total Topics: 21,353
  • Online today: 606
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 453
  • Total: 453

Creating New Boards

Started by ARG, November 23, 2011, 06:11:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ARG

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.

;)

ARG


IchBin

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.

ARG

#3
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?

;)

IchBin

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.

ARG

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. 

IchBin

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.

ARG

Thanx IchBin. I went ahead and changed them all to unicode and now it seems to work fine.

Much appreciated.  ;)

IchBin

Excellent, good to see you got it working.

This website is proudly hosted on Crocweb Cloud Website Hosting.