TinyPortal

Development => Support => Topic started by: Martine M on June 18, 2011, 09:46:45 PM

Title: Database error message
Post by: Martine M on June 18, 2011, 09:46:45 PM
Here I am again, you can't get rid of me.  ;D

If I take "TinyPortal-Downloads" in the SMF 2.0 admin panel I get this error messages.
at my LIve forum and at my Testforum.

"Unknown column 'dlm.author_id' in 'field list'
File: /home/unitedtu/public_html/testforum/Sources/TPdlmanager.php
Line: 505"

When I take "TinyPortal-Articles" I get this

"Unknown column 'author_id' in 'where clause'
File: /home/unitedtu/public_html/testforum/Sources/TPmodules.php
Line: 624"
Title: Re: Database error message
Post by: IchBin on June 18, 2011, 10:00:57 PM
Sorry I don't understand what you are saying when you say "If I take Tinyportal-downloads". What do you mean "take"? Do you mean when you click on the link somewhere? What link are you clicking?

As for the errors, since it tells you that you are missing the author_id column, please verify that you have the author_id column in both the tp_dlmanager and tp_articles tables.
Title: Re: Database error message
Post by: Martine M on June 18, 2011, 10:21:18 PM
yes I meant clicking

If I move mouse over "TinyPortal" in top of the forum a menu pops up and there I can click Downloads and/or articles and then I get those errors.

(I don't have articles yet wanted to make some)

But I see now if I click directly on "TinyPortal" and then go to the left panel of TinyPortal admin panel and take articles and/or TP Downloads I get no errors and I can make articles.

I guess the first onces I clicked on are for going to articles or downloads that already exist and because I have none I get those error.

Title: Re: Database error message
Post by: IchBin on June 19, 2011, 06:11:18 PM
No, the error is saying that it can't find a column in the database. I do not get the same error on this site, do you? It makes me think your tables haven't been installed or updated properly.
Title: Re: Database error message
Post by: Martine M on June 19, 2011, 06:23:12 PM
On this forum? I can't get to it on this forum can I?

But I get the same error message on my test site and on my live site.

And I was thinking everything of the upgrade went well, to nice to be true I geuss :(
hope it is not to hard to get it fixed.
Title: Re: Database error message
Post by: IchBin on June 19, 2011, 06:43:01 PM
You can't see the TinyPortal menu with the downloads link or the "my articles" link?

Did you do this yet?
QuoteAs for the errors, since it tells you that you are missing the author_id column, please verify that you have the author_id column in both the tp_dlmanager and tp_articles tables.
Title: Re: Database error message
Post by: Martine M on June 19, 2011, 07:21:46 PM
I see the download link in the left userblock is that the same one as above in my forum?
Sorry never worked with that yet from TinyPortal, but if it is I don't get error there.
Can't seem to find the my article link.

As for the quote sorry I misunderstood the whole thing there.
I'm trying to find what you mean now, don't know exactly what to look for.

But do you mean when I go to the Tinyportal admin panel and click on tpdownloads in the left menu tabel?
Then I see:
x  name  icon  files  approval  edit/delete

If I click in the left menu on Articles and then in the new screen on General artikels I get this error

Unknown column 'art.author_id' in 'field list'
File: /home/unitedtu/public_html/testforum/Sources/TPortalAdmin.php
Line: 1748

Is that all you needed?


Title: Re: Database error message
Post by: IchBin on June 19, 2011, 07:28:41 PM
You need to look at the database. Using a tool like phpMyAdmin or whatever your host provides. Then look at the articles table and see if there is a author_id column.
Title: Re: Database error message
Post by: Martine M on June 19, 2011, 07:33:15 PM
Ah ok, sorry I really didn't understand, but I know how to do that, back in a sec.
Title: Re: Database error message
Post by: Martine M on June 19, 2011, 07:39:15 PM
well I know how to go to phpmyadmin but only uploaded database with it, don't know how to work with it.

I see the 2 things you wrote down what do I do when I click on one?
smf tp_dlmanager
smf tp_articles
Title: Re: Database error message
Post by: ratbat on June 19, 2011, 09:55:10 PM
@IchBin
After Upgrading from SMF 1.1.12 to 2.0 I have the same problem.

I have a authorID column in the smf_tp_dlmanager table instead of author_ID. Could that be the problem?

Title: Re: Database error message
Post by: Martine M on June 19, 2011, 10:00:17 PM
ah yes now I see it to I have also authorID in both.
Title: Re: Database error message
Post by: ratbat on June 19, 2011, 10:03:54 PM
I fixed it in changing the column names in both tables.  :)
Title: Re: Database error message
Post by: Martine M on June 19, 2011, 10:43:26 PM
Do I have to fix that in the database???????

Never fixed anything in the database.
I have taken a look and I can't seem to find how to change the name.

I better wait for som instruction.
Title: Re: Database error message
Post by: ratbat on June 20, 2011, 12:39:46 AM
That's easy when you use phpMyadmin:

1. Choose the SMF database
2. Click on the table (e. g. smf_tp_dlmanager) on the left side
3. Choose the structure tab
4. Look for authorID and press the edit button behind
5. Change the field name from authorID to author_id
6. Click the save button

Do this with smf_tp_dlmanager and smf_tp_articles. That's it.

Title: Re: Database error message
Post by: IchBin on June 20, 2011, 01:39:11 AM
Awesome. Thanks for reporting guys. It looks like the database script isn't updating the tables properly. I'll add this to my bug list. Following ratbat's suggestion should fix the problem. I edited and made one small change to your instructions ratbat to change it to author_id instead of author_ID. Thanks ratbat!
Title: Re: Database error message
Post by: Martine M on June 20, 2011, 12:30:57 PM
Thanks ratbat, I'll try it later today, can't seem to get on the server website for the moment.
I let you know if I could change it.

Your welcome IchBin
Title: Re: Database error message
Post by: Martine M on June 20, 2011, 05:21:04 PM
Yes finally could get on the server client site.
I fixed it, it was indeed easy now I know how it is done. :)

Did it on live and test forum and all works fine now.
Thanks again.
Title: Re: Database error message
Post by: archiebald on June 21, 2011, 12:10:13 AM
I had similar issues when doing an upgrade.

As a test I then made a clean install of SMF 2.0 and added TP1.104

There were issues with several of the tables that required manual editing of the database. (sorry I didn't make any notes)

As already mentioned there seems to be one or more issues with the install script.

I am running on a Windows 2003 server, PHP 5.3.4 and MySQL 5.0.7