會員註冊 / 登入  |  電腦版  |  Jump to bottom of page

User Forum » Problem after update

發表人: Shivern
10 年 前
Hello.

I've updated from jforum 2.1.9 to 2.3.0 and PostgreSQL 8.0 to 9.0.
It came up and running, i had some problem creating all kind of new stuff (something with the IDs not counting correct up).
I tried creating a new forum, failed because id already existed, tried again, failed again because id existed - just with one higher id.
I kept on doing it until i hit' and id that didn't exist, that worked with that problem.
Same with creating new posts, users and delete posts.

All, except one, worked with that trick, just keep creating until hitting an id that didn't exists.

The one i got a problem with now, is the delete post action. The id problem is there no more, but i get this error when trying to delete a post:

An error has occurred.

For detailed error information, please see the HTML source code, and contact the forum Administrator.

java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String


Any fixes for this issue? smilie

發表人: andowson
10 年 前
For the sequence number issue, you can use the following method to update the sequence value restart with the maximum number of the related table.
SELECT MAX(forum_id) FROM jforum_forums;

For example:
jforum=> select max(forum_id) from jforum_forums;
max
-----
6
(1 row)

We can get the maximum id 6 of the jforum_forums table, and use this value to alter the sequence jforum_forums_seq:
ALTER SEQUENCE jforum_forums_seq RESTART WITH 6;


You can check the postgresql_db_struct.sql to loop through each table with a sequence number.

See the following link for more information about PostgreSQL alter sequence:
http://www.postgresql.org/docs/9.0/static/sql-altersequence.html

For the bug of deleting a post, you can disable the posts cache setting in the admin control panel first. And check if this problem is gone.
If the problem still exists, then you can wait for the next release of JForum 2.3.1.

發表人: Shivern
10 年 前
That works now smilie

Now i found a problem more, else everything looks to work perfectly smilie

I got this message when trying to edit a forum inside the admin panel.

An error has occurred.

For detailed error information, please see the HTML source code, and contact the forum Administrator.

org.postgresql.util.PSQLException: ERROR: relation "jforum_mail_integration" does not exist
Position: 15


But i can see, when creating a new forum, and want to activate it, there is some mail settings that is needed to be set - i guess this isn't set when doing the upgrade.

I tried "Insert" a new forum.
There is only an update button - and when i've filled in everything required, i can still only push update - i tried this.
This doesn't add the new forum, it just sends me to a blank page.

Just so you know, maybe something in the update script needs to be added/edited.

I think maybe its a problem with the database, that the table does not exist or something like that.

發表人: andowson
10 年 前
I guess you didn't run the database schema upgrade script.
Get the script from the following URL:
http://code.google.com/p/jforum2/source/browse/trunk/upgrade/2.2.0/postgresql_2.1.8_to_2.2.0.sql
And read the following wiki to run the PostgreSQL upgrade script:
http://code.google.com/p/jforum2/wiki/UpgradingFrom218To220

發表人: Shivern
10 年 前
I did run the script before.

But i did it again, the same problem when trying to create new forums, but another error when trying to edit:

An error has occurred.

For detailed error information, please see the HTML source code, and contact the forum Administrator.

org.postgresql.util.PSQLException: ERROR: permission denied for relation jforum_mail_integration


I've read that setting the privileges on jforum_mail_integration to public might help, going to try it later.

Thank you, for your time smilie

發表人: andowson
10 年 前
Assume that postgresql_2.1.8_to_2.2.0.sql is stored at /tmp and your database user is jforum, and database name is also jforum, you can use the following commands to recreate the tables:

su - postgres
psql jforum jforum
drop table jforum_mail_integration;
drop table jforum_api;
drop sequence jforum_api_seq;
\i /tmp/postgresql_2.1.8_to_2.2.0.sql
\q

發表人: Shivern
10 年 前
That got it to work smilie

Thank you for your great support.




會員註冊 / 登入  |  電腦版  |  Jump to top of page