Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#21 2010-06-09 01:26:27
- JanDW
- Plugin Author
- From: Providence, RI, USA
- Registered: 2008-07-18
- Posts: 327
- Website
Re: rah_post_versions: Revision control for articles, forms and pages
Hi Gocom,
Just started experimenting with this: I just tried to restore (repost) an old version of an article and got this:
Notice: Undefined index: Status in /public_html/wiki/textpattern/include/txp_article.php on line 195
Notice: Undefined index: Status in /public_html/wiki/textpattern/include/txp_article.php on line 196
Notice: Undefined index: Status in /public_html/wiki/textpattern/include/txp_article.php on line 197
Notice: Undefined index: sLastMod in /public_html/wiki/textpattern/include/txp_article.php on line 206
Notice: Undefined index: LastModID in /public_html/wiki/textpattern/include/txp_article.php on line 208
Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 select unix_timestamp(LastMod) as sLastMod from textpattern where ID= in /public_html/wiki/textpattern/lib/txplib_db.php on line 85
Any ideas per chance? I would also like to request a feature: would it be possible to show diffs between revisions?
Cheers.
edit: I end up on the write tab, and get this message also:
Article NOT saved. modified the article while you were editing it. If you're sure, press the 'save' button once more.
when I then press save
again, this occurs
Notice: Undefined index: Status in /public_html/wiki/textpattern/include/txp_article.php on line 195
Notice: Undefined index: Status in /public_html/wiki/textpattern/include/txp_article.php on line 196
Notice: Undefined index: Status in /public_html/wiki/textpattern/include/txp_article.php on line 197
Notice: Undefined index: sLastMod in /public_html/wiki/textpattern/include/txp_article.php on line 206
Fatal error:
Error: '' is not an integer
assert_int()
textpattern/include/txp_article.php:215 array_map()
textpattern/include/txp_article.php:56 article_save()
textpattern/index.php:141 include()
in /public_html/wiki/textpattern/lib/txplib_misc.php on line 2225
Last edited by JanDW (2010-06-09 01:35:33)
TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX
Offline
#22 2010-06-09 02:40:48
- Gocom
- Plugin Author
- From: Helsinki, Finland
- Registered: 2006-07-14
- Posts: 4,533
- Website
Re: rah_post_versions: Revision control for articles, forms and pages
JanDW wrote:
Any ideas per chance?
Thank you for reporting this, Jan. There were some nasty leftovers from development period. Nasty one line bug. I did release v0.3 that fixes the errors that were caused by an undefined ID. Now you should be able to do the restoring (click repost) and then click the save on the Write panel to save the changes.
The Write panel prompts about the saving, because that is how it treats old forms that are re-submitted. Rah_post_versions submits the exact same form that was sent originally.
I would also like to request a feature: would it be possible to show diffs between revisions
I will look at it :-)
Released version 0.3. Changelog:
- Fixed: now won’t unset ID or Title. Thank you for reporting, Jan.
Last edited by Gocom (2010-06-09 02:47:34)
Offline
#23 2010-06-09 03:39:49
- JanDW
- Plugin Author
- From: Providence, RI, USA
- Registered: 2008-07-18
- Posts: 327
- Website
Re: rah_post_versions: Revision control for articles, forms and pages
Alright Jukka – seems fixed! Thank you.
This plugin is gripping stuff. Happy happy joy joy!
TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX
Offline
#24 2010-06-09 05:12:08
- Natalya
- Member
- From: Essen, DE
- Registered: 2010-01-23
- Posts: 5
Re: rah_post_versions: Revision control for articles, forms and pages
Jukka, while I do not have to add much of substance to the discussion, I’d like to thank you a ton for building this immensly useful plugin!
Offline
#25 2010-06-09 05:34:43
- Gocom
- Plugin Author
- From: Helsinki, Finland
- Registered: 2006-07-14
- Posts: 4,533
- Website
Offline
#26 2010-06-09 16:57:20
- JanDW
- Plugin Author
- From: Providence, RI, USA
- Registered: 2008-07-18
- Posts: 327
- Website
Re: rah_post_versions: Revision control for articles, forms and pages
Hello again – I’m creating a of personal wiki with textpattern. On individual article pages I have an edit link in place using rvm_if_priviliged
.
<txp:rvm_if_privileged><a class="edit" href="/textpattern/index.php?event=article&step=edit&ID=<txp:article_id />">edit</a></txp:rvm_if_privileged>
Is there a way that I can similarly setup a link to that links the article to see all its versions?
I guess by retrieving the corresponding e rah_post_versions group_id to the article id?
http://wiki.dev/textpattern/index.php?event=rah_post_versions&step=rah_post_versions_group&group_id=3
Thanks!
TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX
Offline
#27 2010-06-09 19:29:44
- Gocom
- Plugin Author
- From: Helsinki, Finland
- Registered: 2006-07-14
- Posts: 4,533
- Website
Re: rah_post_versions: Revision control for articles, forms and pages
JanDW wrote:
Is there a way that I can similarly setup a link to that links the article to see all its versions?
Maybe something like this returns the group_id. First version with rah_function:
<txp:rah_function call="safe_field" field="id" table="rah_post_versions_sets" where='grid=<txp:article_id /> and event="article"' />
Or <txp:php>
alternative:
<txp:php>
safe_field(
'id',
'rah_post_versions',
'grid='.article_id(array()).' and event="article"'
);
</txp:php>
Offline
#28 2010-06-09 21:39:10
- JanDW
- Plugin Author
- From: Providence, RI, USA
- Registered: 2008-07-18
- Posts: 327
- Website
Re: rah_post_versions: Revision control for articles, forms and pages
Swell… thanks again. I guess I needed setid
instead of id
though. In case anybody else wants to use this:
<txp:rvm_if_privileged><a class="edit" href="/textpattern/index.php?event=rah_post_versions&step=rah_post_versions_group&group_id=<txp:php>echo safe_field('setid','rah_post_versions','grid='.article_id(array()).' and event="article"');</txp:php>">See versions</a></txp:rvm_if_privileged>
TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX
Offline
#29 2010-06-10 02:41:23
- mrdale
- Moderator
- From: Walla Walla
- Registered: 2004-11-19
- Posts: 2,203
- Website
Re: rah_post_versions: Revision control for articles, forms and pages
Throw in a diff mechanism and this would change everything.
Offline
#30 2010-06-10 03:10:14
- maniqui
- Moderator
- From: Buenos Aires, Argentina
- Registered: 2004-10-10
- Posts: 3,070
- Website
Re: rah_post_versions: Revision control for articles, forms and pages
Just chimed in to say: maybe Gocom can borrow some code from rvm_plugin_diff.
Offline