Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#76 2010-09-25 22:18:33

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [plugin] [ORPHAN] cnk_versioning

cnk_versioning is a plugin that creates editable text files for pages, forms and css. It works this way: it creates the files, and if you edit one of this files (using a text editor), then cnk_verioning fetches the file and saves it back to the database.
That’s why, while the plugin is enabled, if you delete a file (a form, a page or a css), it is going to also be deleted from the database. But with the plugin disabled, you shouldn’t be on the risk of deleting anything. But if, during the time the plugin is disabled, you edit a page/form/css directly thru TXP admin interface, and then you re-enable the plugin, there is a big chance that your changes will be overwritten by cnk_versioning doing its job.

During plugin de-installation nothing should happen at all.
Anyway, my advice is that you have a back up of forms, pages and css folder (btw, yes, you are right, CSS folder could be affected), so if something goes wrong, then you at least have a backup of those folders.
Even better, I would suggest you do to a full database backup (you can usually do a full db backup thru your hosting control panel or thru phpMyAdmin, on even there is a TXP plugin, rss_admin_db_manager, that will let you create database backups directly from TXP admin).

So, once you de-installed cnk_versioning and you confirm that your site is still working OK, and that you can see/edit your pages, forms and CSS directly at the “Presentation” tabs, you are free to get rid of the pages, forms and CSS folders you backed up.

Let me know if this make sense or if I make it sound even more complex?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#77 2010-09-25 22:44:14

linguist
Member
Registered: 2007-11-03
Posts: 24

Re: [plugin] [ORPHAN] cnk_versioning

Thank you very much for a great answer, maniqui. The whole process seems much clearer now. I will uninstall when my courage builds up a little. One more question, if you wouldn’t mind. Are you sure that it won’t be necessary to change anything in the database tables through phpMyAdmin after de-installation?

Offline

#78 2010-09-26 02:40:34

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [plugin] [ORPHAN] cnk_versioning

Linguist, now that you asked that question, I take the time to take a look at cnk_versioning and you may find this interesting: if you re-enable the plugin and visit the tab “Presentation -> Versioning”, you will see that there is a De-install link there.
You may want to put aside everything I said before, and try that link.
Again, I suggest you to do a database backup, and also to back up the forms, pages and css folders, just in case.

So, the steps:

0. Backup database (thru control panel, or phpMyAdmin or rss_db_admin_manager) and/or folders (forms, pages and css)
1. Re-enable cnk_versioning
2. Visit the “Presentation -> Versioning” tab.
3. Click on the “De-install” link
4. See what happens :)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#79 2010-09-26 15:18:03

linguist
Member
Registered: 2007-11-03
Posts: 24

Re: [plugin] [ORPHAN] cnk_versioning

Maniqui, cnk_versioning has been inactive for some time in my Admin. Meanwhile, I have made several changes in Presentation pages and forms. If I understood correctly what you said before, if I enable the plugin now (with the aim to uninstall it), the plugin will delete or change my previous changes or even whole files. Maybe it is better for me to uninstall according to the first variant that you suggested? What do people do if the plugin deletes files, forms, pages, css? (Looks like a major crisis and definitely more than I can handle.) Restoring the site from backup db will take me back to the same situation, with inactive cnk_versioning in my Admin. I would be very grateful for advice. Thank you.

Offline

#80 2010-09-26 16:29:53

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: [plugin] [ORPHAN] cnk_versioning

If I understood correctly what you said before, if I enable the plugin now (with the aim to uninstall it), the plugin will delete or change my previous changes or even whole files.

That can happen if you enable the plugin AND change the site’s production status to “Testing” or “Debugging” AND someone reloads a page on the site. Having cnk_versioning active is safe as long as the site’s production status is “Live”— in “Live”, the plugin will not load template files or affect any changes you’ve made in the Presentation tab.

What I would do is this: Go to the “Preferences” tab under “Admin”. Find the select menu labeled “Production Status”, and make sure it is set to “Live”. Then you can turn on cnk_versioning under the “Plugins” tab without risking any changes to your templates.

I hope this helps!

Offline

#81 2010-09-26 17:16:52

linguist
Member
Registered: 2007-11-03
Posts: 24

Re: [plugin] [ORPHAN] cnk_versioning

Johnstephens, thank you, it’s helpful information. I would like to unistall in the simplest possible way, to avoid risking any changes to my templates or any other complications which I myself won’t be able to handle. Can I uninstall the inactive plugin without turning it on first? Thank you.

Offline

#82 2010-09-27 13:40:39

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: [plugin] [ORPHAN] cnk_versioning

linguist wrote:

Can I uninstall the inactive plugin without turning it on first?

Yes, you can uninstall the plugin by deleting it from the plugins tab, but that will leave it’s columns in your database. Most likely, that won’t be a problem.

For a more thorough uninstall, what I posted in my last message wouldn’t put your site templates at risk:

  1. Backup your database and files.
  2. 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.
  3. Go to the “Plugins” tab under “Admin”. Activate cnk_versioning.
  4. Go to the “Versioning” tab under “Presentation”. Run the “Uninstall” script.
  5. Go to the “Plugins” tab under “Admin”. Deactivate and delete cnk_versioning.

If you have backed up your database and files before making any changes, you can immediately restore them if anything goes wrong, which is very unlikely.

On the other hand, cnk_versioning won’t impact your site at all if you leave the plugin inactive. If you’re not confident about backing up your site or following the steps above, I can’t imagine any negative impact of leaving the plugin there in an inactive state.

Nothing I wrote is a correction to what Maniqui wrote— my only aim was to clarify that cnk_versioning cannot overwrite your templates if your site’s production status is set to “Live”.

I hope this helps!

Edit: Fixed typo.

Last edited by johnstephens (2010-09-27 13:44:14)

Offline

#83 2010-09-27 21:55:15

linguist
Member
Registered: 2007-11-03
Posts: 24

Re: [plugin] [ORPHAN] cnk_versioning

Maniqui and Johnstephens, thank you for your help.

Offline

#84 2010-09-28 11:35:17

jelle
Member
Registered: 2006-06-07
Posts: 165

Re: [plugin] [ORPHAN] cnk_versioning

In TXP 4.3.0 css is “no longer BASE64-encoded in the database.”

Because of this cnk_versioning requires 2 simple edits to work in TXP4.3.0

Thanks to Maniqui for THIS

Offline

#85 2010-09-29 15:23:20

linguist
Member
Registered: 2007-11-03
Posts: 24

Re: [plugin] [ORPHAN] cnk_versioning

Hello again! Could you please help me with this. I was about to uninstall the plugin in the way you recommended when I noticed that the plugin was marked as Modified. I have no idea what was modified and why. Could this present a problem during de-installation? Thank you.

Offline

#86 2010-09-29 15:33:31

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: [plugin] [ORPHAN] cnk_versioning

It has to be modified to be used. When the plugin is initially installed, you have to edit the plugin to designate a directory for cnk_versioning to store your templates in the file system. This has no affect on the uninstall process.

Offline

#87 2010-09-29 17:35:49

linguist
Member
Registered: 2007-11-03
Posts: 24

Re: [plugin] [ORPHAN] cnk_versioning

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.

Offline

#88 2010-09-30 08:05:23

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 606

Re: [plugin] [ORPHAN] cnk_versioning

I’m trying to use this plug-in on an IIS server (if that’s the problem I’m not sure at the moment).

When the plug-in is installed and I try to write my Pages, Forms and CSS to folders I get the following errors:

Warning: Unknown column 'file_mod_time' in 'field list' update txp_form set file_mod_time = FROM_UNIXTIME('1285833467') where 1=1 in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85 Forms were successfully written to the "/forms/" directory.

Warning: Unknown column 'file_mod_time' in 'field list' update txp_page set file_mod_time = FROM_UNIXTIME('1285833467') where 1=1 in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85 Pages were successfully written to the "/pages/" directory.

Warning: Unknown column 'file_mod_time' in 'field list' update txp_css set file_mod_time = FROM_UNIXTIME('1285833467') where 1=1 in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85 Styles were successfully written to the "/css/" directory.

When I go to view my site I get the following errors:

Warning: Unknown column 'file_mod_time' in 'field list' select name,type,IFNULL(unix_timestamp(file_mod_time), 0) as mod_time from txp_form where 1=1 in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_form set name = 'Links', type = 'link', form = '


\n
', file_mod_time = FROM_UNIXTIME('1285833254') in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_form set name = 'article_listing', type = 'article', form = '

    * \n\n ·
      \n\n

', file_mod_time = FROM_UNIXTIME('1285833254') in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_form set name = 'comment_form', type = 'comment', form = '\n\n\n\n \n\n \n\n\n\n \n\n \n\n\n\n \n\n \n\n\n\n \n\n \n\n\n\n\n \n\n
\n \n 	\n \n \n
\n \n 	\n \n
\n \n 	\n \n
\n \n 	\n \n
\n
 	\n \ in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_form set name = 'comments', type = 'comment', form = '\n\n

— · · #
', file_mod_time = FROM_UNIXTIME('1285833254') in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_form set name = 'comments_display', type = 'article', form = '
\">
\n\n\n\n\n
\n\n
\n\n\n\n\n\n

\n', file_mod_time = FROM_UNIXTIME('1285833254') in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_form set name = 'default', type = 'article', form = '\n
\n\n
\n\n\n

\n\n
\n\n
\n\n
—
\n\n

,
\n\n\n\n
\n\n', file_mod_time = FROM_UNIXTIME('1285833254') in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_form set name = 'files', type = 'file', form = ': \n\n []\n\n
\n:
\n: ', file_mod_time = FROM_UNIXTIME('1285833254') in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_form set name = 'lofi', type = 'article', form = '
#
\n\n

\n\n
\n\n
\n\n\n\n', file_mod_time = FROM_UNIXTIME('1285833254') in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_form set name = 'noted', type = 'link', form = '

.
', file_mod_time = FROM_UNIXTIME('1285833254') in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_form set name = 'plainlinks', type = 'link', form = '
', file_mod_time = FROM_UNIXTIME('1285833254') in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_form set name = 'popup_comments', type = 'comment', form = '\n\n\n \n \n \" />\n\n\n\n
\n\n
\n\n\n', file_mod_time = FROM_UNIXTIME('1285833254') in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_form set name = 'search_results', type = 'article', form = '
\n\n

\n\n

\n\n

\n\n
', file_mod_time = FROM_UNIXTIME('1285833254') in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_form set name = 'single', type = 'article', form = '
\n

\n\n
\n\n
\n\n', file_mod_time = FROM_UNIXTIME('1285833254') in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

Warning: Unknown column 'file_mod_time' in 'field list' select name,IFNULL(unix_timestamp(file_mod_time), 0) as mod_time from txp_page where 1=1 in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_page set name = 'archive', user_html = '\n\n\n \n\n \n\n \" />\n\n \n \n\n \n\n \n\n\">\n\n\n
\n

    * \n
    * \n
    * \n
      \n 

\n
\n\n
\n\n\n
\n

    * \n
    * \n
    * \n in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

      Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_page set name = 'error_default', user_html = '\n\n\n \n\n \n\n \" />\n\n \n \n\n \n\n\n\n\n
      \n
          o \n
          o \n
          o \n
            \n \n
      \n\n
      E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

      Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_page set name = 'old_default', user_html = '\r\n\r\n\r\n \r\n\r\n \r\n\r\n \" />\r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\nfront\">\r\n\r\n\r\n
      \r\n
          o \r\n
          o \r\n
          o \r\n E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

            Warning: Unknown column 'file_mod_time' in 'field list' select name,IFNULL(unix_timestamp(file_mod_time), 0) as mod_time from txp_css where 1=1 in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

            Warning: Unknown column 'file_mod_time' in 'field list' insert into txp_css set name = 'default', css = 'LyogYmFzZQ0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8NCg0KYm9keSB7DQoJbWFyZ2luOiAwOw0KCXBhZGRpbmc6IDA7DQoJZm9udC1mYW1pbHk6IFZlcmRhbmEsICJMdWNpZGEgR3JhbmRlIiwgVGFob21hLCBIZWx2ZXRpY2EsIHNhbnMtc2VyaWY7DQoJY29sb3I6ICMwMDA7DQoJYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsNCn0NCg0KYmxvY2txdW90ZSwgaDMsIHAsIGxpIHsNCglwYWRkaW5nLXJpZ2h0OiAxMHB4Ow0KCXBhZGRpbmctbGVmdDogMTBweDsNCglmb250LXNpemU6IDAuOWVtOw0KCWxpbmUtaGVpZ2h0OiAxLjZlbTsNCn0NCg0KYmxvY2txdW90ZSB7DQoJbWFyZ2luLXJpZ2h0OiAwOw0KCW1hcmdpbi1sZWZ0OiAyMHB4Ow0KfQ0KDQpoMSwgaDIsIGgzIHsNCgltYXJnaW46IDAgMCAxNXB4IDA7DQoJcGFkZGluZzogMCAxMHB4Ow0KCWZvbnQtd2VpZ2h0OiBub3JtYWw7DQp9DQoNCmgxLCBoMiB7DQoJZm9udC1mYW1pbHk6IEdlb3JnaWEsIFRpbWVzLCBzZXJpZjsNCn0NCg0KaDEgew0KCWZvbnQtc2l6ZTogMS40ZW07DQp9DQoNCmgyIHsNCglmb250LXNpemU6IDFlbTsNCglmb250LXN0eWxlOiBpdGFsaWM7DQp9DQoNCmhyIHsNCgltYXJnaW46IDJlbSBhdXRvOw0KCXdpZHRoOiAzNzBweDsNCgloZWlnaHQ6IDFweDsNCgljb2xvcjogIzdhN2U3ZDsNCgliYWNrZ3JvdW5k

Added bc. for better code display -Gocom

Thanks Gocom I was having trouble with that.

Last edited by Algaris (2010-09-30 08:53:01)

Offline

#89 2010-09-30 17:54:42

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: [plugin] [ORPHAN] cnk_versioning

Did you make “install” from admin-side -> presentation -> versioning? If YES, check txp_pages\forms\css if they have file_mod_time column.


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

#90 2010-10-01 07:48:23

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 606

Re: [plugin] [ORPHAN] cnk_versioning

Thanks for the reply Victor.

Sorry I should have made that more clear. Yes I installed it from the admin-side -> presentation -> versioning.

Do you mean in the database? I’ve checked the txp_pages\forms\css tables and can’t see the file_mod_time column. All I can see are the entries for the standard Pages, Forms and CSS that come with a clean install.

I guess the other thing I should mention is that this is a clean install with just hak_tinymce running along side cnk_versioning.

—Edit—

I decided to try uninstalling the plug-in from presentation -> versioning to see if I could try reinstalling it again and revived the following error:

Warning: Can't DROP 'file_mod_time'; check that column/key exists ALTER TABLE txp_form DROP `file_mod_time` in E:\Inet\ross\textpattern\lib\txplib_db.php on line 85

Deinstallation aborted

Last edited by Algaris (2010-10-01 08:04:48)

Offline

Board footer

Powered by FluxBB