[WIP] [3.2][feature/revisions] Implement post revision tracking#1200
[WIP] [3.2][feature/revisions] Implement post revision tracking#1200imkingdavid wants to merge 302 commits intophpbb:developfrom
Conversation
|
Probably not from this PR but ACP -> Permissions -> * Roles -> any role: Attempting to delete topic starter (protected by default) in revision history: Reverse compare between any revision # (e.g. 2 & 3 or 4 & 9) other than the first and x (i.e. 1 & 3 or 1 & 9) gives \n\n for line spacing. image: http://www.oddmods.co/mods/revision_line_spacing_reverse_compare.png |
Can you check if you get this error on develop. I'm not sure how that would be an issue with this feature specifically.
By topic starter, you mean the original revision of the topic? I'll see if I can reproduce this. To note, protecting a revision does not prevent it from being deleted; it only prevents it from being removed by the automatic pruning tasks.
I will see if I can reproduce this. Thanks for testing! |
|
The Strict Standards error is in develop so nothing to do with this PR. Original topic (topic starter or first post) yes. The specified post ID has no associated revisions which is correct but attempt to view the post by selecting the topic from the index and the error shows. More testing on the Reverse compare shows if only one edit, the error shows /n/n for a line spacing. More than one and the scenario I posted above is true. Would be nice to see a description above each column in revision history (although it does not take long to understand it) and the delete button inline with (protect) (restore) etc. |
|
Okay, I see it displaying \n\n when doing a reverse comparison. I will take a look and see why it is doing that. I have reproduced the error caused by deleting all of the revisions and am working on an issue. The problem was that the delete function was not updating the post edit count, so it thought it had revisions when it didn't, and that was generating an error on viewtopic. |
|
I have fixed the issue with deleting revisions. In regards to the other issue, it appears that any time you view a deletion of a line break, it displays |
|
Restoring unprotected post shows this before submit (NOTE the selected compare of the word "edit"): http://www.oddmods.co/mods/revision_restore_compare.png |
|
The issue with the undefined function was because i had forgotten to update my repository file with the file I was using on my local test board. This has been fixed. As for how the diff displays the change with the word "edit", that is unfortunately the way it is shown, and there's not really much I can do to change that. |
|
Delete the first in revision history. |
|
I created a post and edited it twice (two revisions plus the current version). I deleted the first revision, and then without a page refresh, deleted the second revision. I did not see any error about revisions not being found. Are you using with javascript or without? EDIT: If you mean you would like a "Return to post" link from the "This post has no associated revisions" page, that can be done. |
|
argh! back buttoning is not a good idea sorry. EDIT* funny thing is even with that ("The specified post ID has no associated revisions."), the edit is removed. |
|
Restore post line space \n\n : http://www.oddmods.co/mods/revision_restore_line_space_compare.png Would there be a simple way to distinguish between an edit and a restore? |
phpBB/language/en/acp/revisions.php
Outdated
|
Upgrade from 3.0.11.. |
|
revision.USERNAME. I would have thought as the edited name appears on the post (i.e. "Last edited by Admin"), then the Username who's revision it is should follow into revision history. Also what about headings for the columns in the revision page : http://www.oddmods.co/mods/revision_head.png |
|
As for the database_update issue, I've decided I'm just going to wait for the migrations pull requests to be merged, rather than fix database_update, only to scrap it anyway.
I don't understand the problem you are describing.
That looks good thanks for the suggestion. |
|
Also, I have made the revisions page show up for all existing posts, even if no revisions have been created. In that case it simply shows the current post. |
When someone edits a post, the username shows as the editor under the post ("Last edited by username"). When viewing post revisions, the username always shows as the original poster, not the editor. In the revision_head.png image above, all show GModerator - most of those revisions (edits) were made by Admin. |
|
Oh, I didn't realize that since I've been testing with only one user. xD |
|
It looks to me like I have it storing the wrong user ID when posts are edited; right now it's storing the original post author's user ID, so I need to change it to store the current user's ID when an edit occurs. |
|
Alright, just fixed that issue, I think. |
Looks much betterra. revisions_comparison_list.html loses shape when minimising. |
phpBB/config/routing.yml
Outdated
There was a problem hiding this comment.
If possible, I'd prefer that we use some good organization for this.
config/routing/post_revisions.yml (for all /post/revisions routes).
Good organization from the start will be very helpful in the longrun. :)
There was a problem hiding this comment.
IIRC only routing.yml is loaded automatically. Is there a way to "include" other routing files within this one? Otherwise, we'll have to modify this on the PHP side every time we want to add routing for another component.
There was a problem hiding this comment.
I would assume it works the same as the other yml files (see the top of services.yml).
There was a problem hiding this comment.
Found this: http://symfony.com/doc/current/book/routing.html#including-external-routing-resources
I'll work on adapting what I have to that.
There was a problem hiding this comment.
Have you tried the prefix option to see if that works? That would be really nice to use.
There was a problem hiding this comment.
Well right now I'm trying to get the resource loading to work.
Cannot import resource "config\routing/post_revisions.yml" from "routing.yml".
I can't find where it inserts the "config" part. I'm wondering if it's the \ instead of /. Maybe it's because I'm on Windows?
There was a problem hiding this comment.
Maybe it doesn't work with subdirectories? You try just in the config/ directory?
|
@EXreaction any testing and feedback you can provide on this would be great. I'll take a look at this tomorrow afternoon sometime. |
|
Missing the modules from the migration |
|
When you mention permissions in your todo, I assume you mean add the new permissions to existing roles, right? If not, that needs to be done. :) |
PHPBB3-110755
…ve bolding PHPBB3-10755
PHPBB3-10755
PHPBB3-10755
PHPBB3-10755
…revisions # By Marc Alexander (160) and others # Via Joas Schilling (52) and others * 'develop' of github.com:imkingdavid/phpbb3: (607 commits) [prep-release-3.1.0-a3] Update version to 3.1.0-a4-dev for future development [ticket/11880] migration helper file [prep-release-3.1.0-a3] Commit changelog for 3.1.0-a3 [ticket/11880] Move get_schema_steps function to a migrator helper class [prep-release-3.1.0-a3] Prepare Changelog [prep-release-3.1.0-a3] Add migration for 3.1.0-a3 [prep-release-3.1.0-a3] Update version to 3.1.0-a3 [ticket/12163] Use posts_per_page to calculate current page in viewtopic.php [develop] Remove left over conflict marker from merge 1a31f03 [ticket/12162] Set language to C before running diff to ensure its english [ticket/11509] Be exact when referencing the branch name. [ticket/12141] Disable broken opcache extension on PHP 5.5.7. [ticket/12141] PHP extension setup must happen before webserver + PHP-FPM. [ticket/12161] Do not use subdirectories in build/save directory. [ticket/11985] Do not try to setup PHP extensions on HHVM. [ticket/11985] Rename install -> setup. This is more generic and consistent. [ticket/11509] Run commit message checker only in one environment. [ticket/11509] Contrary to docs, COMMIT_RANGE is not available in PR mode. [ticket/12159] Fix codesniffer complaints due to profilefields and passwords [ticket/11880] Break up schema changes in the migrator ... Conflicts: phpBB/install/schemas/mssql_schema.sql tests/test_framework/phpbb_functional_test_case.php
|
status on this / test failures? |
|
@naderman i haven't really looked at this recently. I'll try to make some more progress soon |
Conflicts: phpBB/install/schemas/mssql_schema.sql
…develop Changed url() to route() and removed user location field that is now a custom field. PHPBB3-10755
PHPBB3-10755
|
|
Ah :( |
|
The rebase for this is going to take too much work. When I get back to this, I'm just going to start a new branch and a new PR, following along with this one as I go. |
|
as you wish :) and don't hesitate to ask if you need something. I'll be glad to help you (I'd love to have that feature in 3.2 :p) |
The majority of the functionality has been tested and works. There are still a few minor things that need to be done and tested, but I would like to go ahead and get the peer testing/reviewing started.
To test:
Still to do: