[RC] Prime Post Revisions - View all edits to posts

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
User avatar
primehalo
Former Team Member
Posts: 2828
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Post Revisions (0.0.3) - View all edits to post

Post by primehalo » Tue Dec 11, 2007 9:54 am

Strange, I've made long posts before and never got that error. Do you have phpMyAdmin or some other way to modify your dataase? If so, In the phpbb_post_revisions table, post_text is currently set as a mediumtext, so try changing it to mediumblob and see if that fixes it.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [BETA] Prime Post Revisions (0.0.3) - View all edits to post

Post by saaiberke » Tue Dec 11, 2007 10:11 am

Ok, I will try that. Thank you for the info.

Grtz,

Nic

EDIT: And it worked :) Thank you very much!!!!

ibelphegor
Registered User
Posts: 453
Joined: Wed Oct 24, 2007 8:37 am

Re: [BETA] Prime Post Revisions (0.0.4) - View all edits to post

Post by ibelphegor » Tue Jan 08, 2008 10:18 pm

hi, thanks for the mod.
i try this on local and edit posts and all good except when i try to edit post with image:

Code: Select all

SQL ERROR [ mysql4 ]

Data too long for column 'post_subject' at row 1 [1406]

SQL

INSERT INTO phpbb_post_revisions (post_id, post_subject, post_text, bbcode_uid, post_edit_time, post_edit_user, post_edit_reason) VALUES (5340, 'ככה התוכים עושים חיים...', '[img:2kds1y66]http://www.photoshoptalent.com/images/contests/colorful%20bird/fullsize/colorful%20bird_476d2ebf4e2a9.jpg[/img:2kds1y66]', '2kds1y66', 1199830297, '2', '')

BACKTRACE

FILE: includes/db/mysql.php
LINE: 158
CALL: dbal->sql_error()

FILE: posting.php
LINE: 1026
CALL: dbal_mysql->sql_query()
using phpbb3 gold.

User avatar
primehalo
Former Team Member
Posts: 2828
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Post Revisions (0.0.4) - View all edits to post

Post by primehalo » Tue Jan 08, 2008 11:04 pm

ibelphegor wrote:hi, thanks for the mod.
i try this on local and edit posts and all good except when i try to edit post with image:

Code: Select all

SQL ERROR [ mysql4 ]

Data too long for column 'post_subject' at row 1 [1406]

SQL

INSERT INTO phpbb_post_revisions (post_id, post_subject, post_text, bbcode_uid, post_edit_time, post_edit_user, post_edit_reason) VALUES (5340, 'ככה התוכים עושים חיים...', '[img:2kds1y66]http://www.photoshoptalent.com/images/contests/colorful%20bird/fullsize/colorful%20bird_476d2ebf4e2a9.jpg[/img:2kds1y66]', '2kds1y66', 1199830297, '2', '')

BACKTRACE

FILE: includes/db/mysql.php
LINE: 158
CALL: dbal->sql_error()

FILE: posting.php
LINE: 1026
CALL: dbal_mysql->sql_query()
using phpbb3 gold.
Are you sure it's because of the image and not because of the text in the subject line? The error says that the subject is too long. Try this, in "posting.php" find:

Code: Select all

                        'post_subject'     => $original_post_data['post_subject'],
                        'post_text'        => $original_post_data['post_text'],
  
And replace it with this:

Code: Select all

                        'post_subject'     => utf8_normalize_nfc($original_post_data['post_subject']),
                        'post_text'        => utf8_normalize_nfc($original_post_data['post_text']),
  
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

ibelphegor
Registered User
Posts: 453
Joined: Wed Oct 24, 2007 8:37 am

Re: [BETA] Prime Post Revisions (0.0.4) - View all edits to post

Post by ibelphegor » Wed Jan 09, 2008 1:43 pm

No, not sure that because edit post with image.
but it is happen when i edit post with image..
but now i see it happen all the time.
i update your recommendation and it is not work. :cry:

Code: Select all

SQL ERROR [ mysql4 ]

Data too long for column 'post_subject' at row 1 [1406]

SQL

INSERT INTO phpbb_post_revisions (post_id, post_subject, post_text, bbcode_uid, post_edit_time, post_edit_user, post_edit_reason) VALUES (5123, 'שאלה', 'אלי ועוזי..\nנכון יש את הדרגות משתמש בצד?\nיש משתמש מתחיל\nאח"כ משתמש מתקדם אח"כ v.i.p וזהו?', '2dij0zoq', 1199886175, '2', '')

BACKTRACE

FILE: includes/db/mysql.php
LINE: 158
CALL: dbal->sql_error()

FILE: posting.php
LINE: 1026
CALL: dbal_mysql->sql_query()

User avatar
primehalo
Former Team Member
Posts: 2828
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Post Revisions (0.0.4) - View all edits to post

Post by primehalo » Wed Jan 09, 2008 10:11 pm

ibelphegor wrote:No, not sure that because edit post with image.
but it is happen when i edit post with image..
but now i see it happen all the time.
i update your recommendation and it is not work. :cry:

Code: Select all

SQL ERROR [ mysql4 ]

Data too long for column 'post_subject' at row 1 [1406]

SQL

INSERT INTO phpbb_post_revisions (post_id, post_subject, post_text, bbcode_uid, post_edit_time, post_edit_user, post_edit_reason) VALUES (5123, 'שאלה', 'אלי ועוזי..\nנכון יש את הדרגות משתמש בצד?\nיש משתמש מתחיל\nאח"כ משתמש מתקדם אח"כ v.i.p וזהו?', '2dij0zoq', 1199886175, '2', '')

BACKTRACE

FILE: includes/db/mysql.php
LINE: 158
CALL: dbal->sql_error()

FILE: posting.php
LINE: 1026
CALL: dbal_mysql->sql_query()
In your database there is a table called phpbb_posts and a table called phpbb_post_revisions. In each of those two tables, can you tell me what the type is for post_subject (like text or varchar(100) or blob)? I'm thinking the type may have been changed from earlier versions of phpBB3.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

ibelphegor
Registered User
Posts: 453
Joined: Wed Oct 24, 2007 8:37 am

Re: [BETA] Prime Post Revisions (0.0.4) - View all edits to post

Post by ibelphegor » Wed Jan 09, 2008 10:53 pm

absolutely,
phpbb_posts : InnoDB
phpbb_post_revisions : MyISAM

and when i look in the database i see something that i think not supposed to be.
all my table in database Collation utf8_bin and phpbb_post_revisions latin1_swedish_ciImage

BTW,
there is a possibility to make the mod only for admin?

thanks.

User avatar
primehalo
Former Team Member
Posts: 2828
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Post Revisions (0.0.4) - View all edits to post

Post by primehalo » Wed Jan 09, 2008 11:06 pm

ibelphegor wrote:absolutely,
phpbb_posts : InnoDB
phpbb_post_revisions : MyISAM

and when i look in the database i see something that i think not supposed to be.
all my table in database Collation utf8_bin and phpbb_post_revisions latin1_swedish_ciImage

BTW,
there is a possibility to make the mod only for admin?

thanks.
A different storage engine for each table? That's really weird. But I want to know the type of post_subject.
For example:
table: phpbb_posts
field: post_subject
type: text

table: phpbb_post_revisions
field: post_subject
type: varchar(100)

If you have varchar(100), try changing it to "text".
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

ibelphegor
Registered User
Posts: 453
Joined: Wed Oct 24, 2007 8:37 am

Re: [BETA] Prime Post Revisions (0.0.4) - View all edits to post

Post by ibelphegor » Wed Jan 09, 2008 11:22 pm

sorry..

phpbb_posts
post_subject : varchar(100)
post_text : mediumtext

phpbb_post_revisions
post_subject : varchar(100)
post_text : mediumblob

i hope this is what you mean.
if not i make image of the 2 table.

edit:
i try to change "text" and not work.


edit 2:
i fix the problem...
i change the phpbb_post_revisions from "latin1_swedish_ci" to "utf8_bin"
and now it is work perfect.

seamusryan
Registered User
Posts: 55
Joined: Mon Mar 26, 2007 3:33 am

Re: [BETA] Prime Post Revisions (0.0.4) - View all edits to post

Post by seamusryan » Thu Jan 17, 2008 11:46 am

I am not sure if this is supposed to happen or not.

But when a regular user who is not a moderator edits a post of theirs, it does not show up in the moderator log. But it used to. Is there a way of making it show up on the moderator log?

Or has it always been like this?
If so, i think i need some sleep.

Also, is there a page i am not seeing that allows an admin/mod to see all the recent edits?
The only other thing i believe should be available is an option for moderators/admins to not store an edit in the post revisions table.

saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [BETA] Prime Post Revisions (0.0.4) - View all edits to post

Post by saaiberke » Thu Jan 17, 2008 12:20 pm

I'm wondering if the tables aren't going to grow out of proportion on a big board when keeping all the changes, maybe it would be interesting to build in a flush possibility?

Grtz,

Nic

User avatar
primehalo
Former Team Member
Posts: 2828
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Post Revisions (0.0.4) - View all edits to post

Post by primehalo » Thu Jan 17, 2008 7:17 pm

seamusryan wrote:I am not sure if this is supposed to happen or not.

But when a regular user who is not a moderator edits a post of theirs, it does not show up in the moderator log. But it used to. Is there a way of making it show up on the moderator log?

Or has it always been like this?
If so, i think i need some sleep.

Also, is there a page i am not seeing that allows an admin/mod to see all the recent edits?
The only other thing i believe should be available is an option for moderators/admins to not store an edit in the post revisions table.
I never had my MOD add a log event, I just let the board handle that. I thought it did log whenever someone edited their post, but maybe this was changed in one of the release candidates?
saaiberke wrote:I'm wondering if the tables aren't going to grow out of proportion on a big board when keeping all the changes, maybe it would be interesting to build in a flush possibility?

Grtz,

Nic
The ability to delete individual revisions, all revisions of a post, and all revisions made before a certain date are planned features, along with the ability for admins to choose to not store a revision. I just haven't had the time to continue working on it (paid projects take precedence). This is basically why I haven't made it a 1.0.0 release yet.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

seamusryan
Registered User
Posts: 55
Joined: Mon Mar 26, 2007 3:33 am

Re: [BETA] Prime Post Revisions (0.0.4) - View all edits to post

Post by seamusryan » Thu Jan 17, 2008 11:25 pm

primehalo wrote: I never had my MOD add a log event, I just let the board handle that. I thought it did log whenever someone edited their post, but maybe this was changed in one of the release candidates?
Thats what i thought. But i just did a clean install on a test server and it doesn't show.
It would be great if someone could confirm this for me.

darksage429
Registered User
Posts: 3
Joined: Tue Feb 12, 2008 3:44 pm

Re: [BETA] Prime Post Revisions (0.0.4) - View all edits to post

Post by darksage429 » Tue Feb 12, 2008 4:56 pm

For the SQL portion, how would I write the following for SQL Server 2005 Express?

CREATE TABLE IF NOT EXISTS phpbb_post_revisions (
post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
post_subject varchar(100) DEFAULT '' NOT NULL,
post_text mediumblob DEFAULT '' NOT NULL,
bbcode_uid varchar(8) DEFAULT '' NOT NULL,
post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
post_edit_reason varchar(255) DEFAULT '' NOT NULL,
KEY post_id (post_id)
);

Parsing it reveals the following errors.

Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'IF'.
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'phpbb_post_revisions'.

Any hints/tips would be appreciated.

User avatar
primehalo
Former Team Member
Posts: 2828
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Post Revisions (0.0.4) - View all edits to post

Post by primehalo » Tue Feb 12, 2008 7:41 pm

darksage429 wrote:For the SQL portion, how would I write the following for SQL Server 2005 Express?

CREATE TABLE IF NOT EXISTS phpbb_post_revisions (
post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
post_subject varchar(100) DEFAULT '' NOT NULL,
post_text mediumblob DEFAULT '' NOT NULL,
bbcode_uid varchar(8) DEFAULT '' NOT NULL,
post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
post_edit_reason varchar(255) DEFAULT '' NOT NULL,
KEY post_id (post_id)
);

Parsing it reveals the following errors.

Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'IF'.
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'phpbb_post_revisions'.

Any hints/tips would be appreciated.
I'm no SQL expert, so I'm really not sure, but you should be able to remove the IF NOT EXISTS part. I put that there so you wouldn't get an error if you tried to add it twice.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

Locked

Return to “[3.0.x] MODs in Development”