Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] cnk_versioning
can you run such sql commands (one-by-one) (via phpmyadmin, for example) and show here the result?
show columns from txp_css;
show columns from txp_form;
show columns from txp_page;
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
#92 2010-10-01 08:42:22
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 606
Re: [plugin] [ORPHAN] cnk_versioning
It was a little difficult trying to copy and paste a table into a readable form for the forum so I just copied the Field names. I hope that’s okay.
SHOW COLUMNS FROM txp_css;
name
css
SHOW COLUMNS FROM txp_form;
name
Type
Form
show columns from txp_page;
name
user_html
Last edited by Algaris (2010-10-01 08:42:55)
Offline
Re: [plugin] [ORPHAN] cnk_versioning
Yok, you tried to unistall plugin – but it dropped an error, because while deinstallation it tries to delete column file_mod_time. But you don’t have such column. Try again press install at plugin’s page and watch if there are any errors or good messages.
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
#94 2010-10-01 09:29:38
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 606
Re: [plugin] [ORPHAN] cnk_versioning
Whooo! That worked, thanks for your help.
Offline
Re: [plugin] [ORPHAN] cnk_versioning
linguist wrote:
Good to know that, thanks. Just to know a little more about what to expect, will there be some kind of dialogue during the uninstall process? I mean, questions like: Remove this? Delete that? And how to respond to them? I’m really sorry to bother you with all this, but there’s no one else I can ask. Really appreciate your help.
Here’s a live report of an actual uninstall:
- Backing up: The dialogs involved in this depend on what method you use.
- Go to the “Preferences” tab under “Admin”. Make sure the site’s production status is set to “Live”, and click the “Save” button if you make any changes. Status message: Preferences saved
- Go to the “Plugins” tab under “Admin”. Activate cnk_versioning. Status message: Plugin cnk_versioning updated.
- Go to the “Versioning” tab under “Presentation”. Click “Deinstall” to run the uninstall script. Click “Yes, I really want to deinstall”. Status message: Deinstallation was successful
- Go to the “Plugins” tab under “Admin”. Deactivate cnk_versioning. Status message: Plugin cnk_versioning updated. Delete cnk_versioning. Browser dialog: Are you sure? Select “OK”. Status message: Plugin cnk_versioning deleted.
That’s all.
Offline
#96 2010-10-11 13:24:47
- linguist
- Member
- Registered: 2007-11-03
- Posts: 24
Re: [plugin] [ORPHAN] cnk_versioning
Johnstephens, thank you for your help.
Offline
Re: [plugin] [ORPHAN] cnk_versioning
Giving the plugin a whirl and having a few issues. The $CNK_VER_OUTPUT_PATH at first I got wrong but now that is ok, the /versions/ folder and their sub-folders (pages/forms/css) is within the /textpattern/ folder and all permissions set to 777.
I get a success message (Forms were successfully written to the “/forms/” directory. etc) when running Write to Files but upon inspection there is nothing in /forms, /pages or /css and I see an Unknown section error on the front page of the site (running in Testing mode).
Wondering what I missed??!
Offline
Re: [plugin] [ORPHAN] cnk_versioning
Jonathan: it doesn’t seem to me that you missed anything, but it may have been one of those times when this awesome plugin goes awry. It always needs one or two tries until it gets properly configured.
First, I hope you have a backup. Your forms & pages & css may have just got vanished :o
Remember: one this plugin is set, it will update/add any new file as a form/page/css, and also will delete any form/page/css not present anymore.
So, it seems that the plugin never wrote the files (forms, pages and css) to the filesystem (that’s incorrect behavior), but then, when it went to read the files, it didn’t find anything on those folders, and so, acting accordingly, it deleted every form/page/css from the database. That is correct behavior of the plugin.
That’s what you got the Unknown section message. You have some page template assigned to some section, but TXP can’t find the page template anymore, so, it prints that error message (it should be more lie Missing like page template, than Unknown section).
Bottom line: I’m not sure why it said it wrote the files sucessfully but then, there were no files in the folder. I’d suggest re-installing/re-configuring the plugin.
Offline
Re: [plugin] [ORPHAN] cnk_versioning
I’m excited to try out this plugin, but first …
Can someone verify that cnk_versioning 0.1.6 (near as I can tell, the current version on textpattern.org) will be compatible with Textpattern 4.4.0? Much obliged!
Well’s all that ends.
Offline
#100 2011-06-18 05:32:17
Re: [plugin] [ORPHAN] cnk_versioning
Check the OP: there is version cnk_versioning 0.1.7.
And it think it works OK with 4.4.0 (I’ve yet to test, but it worked ok with 4.3.0).
Offline
#101 2011-06-18 08:36:40
Re: [plugin] [ORPHAN] cnk_versioning
Oops, better make that Textpattern version: 4.4.1 (r3575) (as of five minutes ago!) And I guess the answer to my question is “Nope, nobody has tested it with that version yet, but you may as well be the first.”
=^D
I’ll let you know how it goes. I’m pretty sure I won’t get around to it tonight, though …
Even though I have a db backup, I wanted to clarify one last thing: the full path to the directories I’m supposed to create.
In the OP the plugin author says “Before installation, you have to create a php-writable “forms”, “pages” and a “css” directory in the textpattern root directory.” I’m not sure whether that means:
- the DocumentRoot of my Apache VirtualHost, i.e.:
~/public_html/forms~/public_html/pages~/public_html/css
- the
/textpattern/directory inside the DocumentRoot, i.e.:~/public_html/textpattern/forms~/public_html/textpattern/pages~/public_html/textpattern/css
- or some other variant … for example, jstubbs mentioned that he used folders like this:
~/public_html/textpattern/versions/forms~/public_html/textpattern/versions/pages~/public_html/textpattern/versions/css
… but then again, he also had trouble with the plugin.
Or is it really that I can set the $CNK_VER_OUTPUT_PATH to any directory I want? I could just blunder through with it, but it would be nice if it were clearer in the documentation, so I’m asking for the benefit of future forum readers as much as for myself.
Last edited by hotwebmatter (2011-06-18 09:07:22)
Well’s all that ends.
Offline
#102 2011-06-18 08:49:08
Re: [plugin] [ORPHAN] cnk_versioning
maniqui wrote:
And it think it works OK with 4.4.0 (I’ve yet to test, but it worked ok with 4.3.0).
Yes, it works just fine. Relevant callbacks and database structure hasn’t changed in “awhile”.
hotwebmatter wrote:
“Nope, nobody has tested it with that version yet, but you may as well be the first.”
Don’t worry, you won’t be the first to use cnk_versioning ;) Pretty much every serious team of developers uses it or some similar tool. Makes using versioning systems — um — easier.
Last edited by Gocom (2011-06-18 08:55:48)
Offline
#103 2011-06-18 22:28:09
Re: [plugin] [ORPHAN] cnk_versioning
Well, I did it, and it works — almost.
At first I had the same Unknown column 'file_mod_time' in 'field list' warnings as algaris but I fixed this by running “install” from admin-side -> presentation -> versioning.
Now it works flawlessly for Pages and Forms, but the CSS is getting corrupted. If I disable the plugin and view presentation -> style, it looks like all the punctuation is stripped from the markup:
bodymargin0pxpadding0pxcolor6c6969fontfamilyTahomaGenevasansseriffontsize12pxlineheight15embackgroundcolor252423backgroundimageurlimages/templatemobodyjpgbackgroundrepeatrepeatxbackgroundpositiontopaalinkavisitedcolor990000ahovercolorAAAA00textdecorationnoneamoredisplayblockwidth137pxheight35px
… etc., etc.
Any idea why that might be happening?
Here’s what I’m running:
TXP version: Textpattern 4.1.1 (just released last night)
Server version: Apache/2.2.14 (Ubuntu)
PHP 5.3.2-1ubuntu4.9 with Suhosin-Patch
Last edited by hotwebmatter (2011-06-19 05:17:11)
Well’s all that ends.
Offline
#104 2011-06-19 01:57:19
Re: [plugin] [ORPHAN] cnk_versioning
hotwebmatter wrote:
At first I had the same
Unknown column 'file_mod_time' in 'field list'warnings as algaris but I fixed this by running “install” from admin-side -> presentation -> versioning.
That will show up to everyone until the plugin is installed by manually running the installer
Now it works flawlessly for Pages and Forms, but the CSS is getting corrupted. If I disable the plugin and view presentation -> style, it looks like all the punctuation is stripped from the markup:
Are you sure it’s stripped from punctuation and that it’s it not actually base64 encoded string? If it is base64 encoded string (which would mean you are using the 0.1.7 Julián linked – etc), you will need to remove base64_encode / base64_decode instances from the plugin source. Back in the day CSS used to be stored as base64 encoded string, but it was later on dropped.
So, go to your plugins pane and click cnk_versioning’s edit link. From the source find line:
$css = doSlash(base64_encode(file_get_contents($filename)));
And change it to:
$css = doSlash(file_get_contents($filename));
And then line:
if (@file_put_contents('../'.$CNK_VER_OUTPUT_PATH.'css/'.$r['name'].'.'.$CNK_VER_EXT_CSS, base64_decode($r['css'])) === false) return false;
And change it to:
if (@file_put_contents('../'.$CNK_VER_OUTPUT_PATH.'css/'.$r['name'].'.'.$CNK_VER_EXT_CSS, $r['css']) === false) return false;
…or just simply search for base64_ and remove the function.
Last edited by Gocom (2011-06-19 02:09:42)
Offline
#105 2011-06-19 05:16:33
Re: [plugin] [ORPHAN] cnk_versioning
Thanks, Gocom!
I found the base64 functions and removed them from both lines as you instructed. Now I’m getting a new error and some odd behavior. Whenever I load a page on my site from either the front-end or admin-side interfaces, I see:
Parse error: syntax error, unexpected '[' in /home/userid/hotwebmatter.com/textpattern/lib/txplib_misc.php(653) : eval()'d code on line 410 The above errors were caused by the plugin:cnk_versioning
Also, it seems odd that although the cnk_versioning plugin is enabled and Production Status is set to “Testing” in Admin Preferences, I can now edit the pages, forms and css styles in the admin-side interface. (I thought this functionality was supposed to be disabled if the plugin were correctly installed.)
If needed, I can paste the cnk_ver_update_css() and cnk_ver_pull_css functions in their entirety for context, just to verify that I haven’t fat-fingered something. Let me know if that would be helpful.
Well’s all that ends.
Offline