Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#193 2013-01-31 22:30:33

John Smith
New Member
Registered: 2013-01-31
Posts: 4

Re: [plugin] [ORPHAN] cnk_versioning

Spent 30 mins to make plugin work with 4.5.4 by lurking entire topic.

Instruction

  1. Create “_templates” folder in TXP web root.
  2. Create “css”, “forms” and “pages” folders inside “_templates”.
  3. Install plugin from this link
  4. Open plugin file in Admin panel
  5. Replace line $CNK_VER_OUTPUT_PATH = ‘admin/’; with $CNK_VER_OUTPUT_PATH = ‘_templates/’;
  6. Click Save
  7. Enable plugin
    WARN: do not click on “Manually trigger Form, Page & CSS update” – PLUGIN DOES NOT CHECK EMPTY FILES. IT WILL ERASE ALL YOUR TEMPLATES INSIDE DB.
  8. Go to templates section and click on Versioning tab
  9. Click on Install
  10. Ensure your site in Testing mode and visit it once
  11. Done.

Documentation will save this world.

Last edited by John Smith (2013-01-31 22:35:29)

Offline

#194 2013-01-31 23:30:15

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,260

Re: [plugin] [ORPHAN] cnk_versioning

John Smith wrote:

Documentation will save this world.

Volunteers will do. Thanks! :)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#195 2013-03-04 20:51:20

gour
Member
From: Hlapičina, Croatia
Registered: 2013-01-17
Posts: 124

Re: [plugin] [ORPHAN] cnk_versioning

John Smith wrote:

Spent 30 mins to make plugin work with 4.5.4 by lurking entire topic.

Have problem installing it…

Click on Install

After this step I get: “Installation was successful” message

Ensure your site in Testing mode and visit it once

My site is (fresh 4.5.4 install and it’s) in the Testing mode and all what I get after visiting it, is the blank page.

Any hint?

Offline

#196 2013-04-23 19:38:12

georgeM
Member
From: Toronto, Canada
Registered: 2006-02-27
Posts: 43
Website

Re: [plugin] [ORPHAN] cnk_versioning

gour wrote:

My site is (fresh 4.5.4 install and it’s) in the Testing mode and all what I get after visiting it, is the blank page.
Any hint?

You can try clicking the “Write pages & forms to files” link under Presentation —> Versioning. Note that you probably want to do this on a clean site, rather than one which you’ve already customized the Presentation elements from (just to be safe that it doesn’t overwrite anything).

This usually works for me with no issue. Hope that helps!

Last edited by georgeM (2013-04-23 19:38:50)

Offline

#197 2013-05-09 13:11:05

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Re: [plugin] [ORPHAN] cnk_versioning

I’ve just installed this plugin on a fresh 4.5.4 install.
I followed the instructions.

All pages, forms and css were deleted. Nothing was added to the _templates folder.
A strange massage about adi_variables being ignored.

Switching off the plugin :-
Presentation – Page gives-
Warnings about a variable ‘out’ and function ‘join’ being passed too many parameters.
Then I see a blank page and that all pages have been deleted.

Now I’ll have to waste half an hour getting back to square one …


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#198 2013-05-09 14:50:52

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

Re: [plugin] [ORPHAN] cnk_versioning

Hi Geoff.

Yeah, sometimes this plugin acts a bit weird. But only during installation process. Once you have it properly installed, it works like a charm.
Hope you have a backup of your stuff :)

The adi_variables messages comes from a mod I did (with the help of a friend) to this plugin, that adds the ability of ignoring certain forms and pages. That’s was the only way to make cnk_versioning compatible with adi_variables plugin, and so, with any other plugin that may need to create and maintain forms or pages on the database, that shouldn’t be stepped over nor deleted if cnk_versioning doesn’t find them in the forms or pages folder. BTW, it’s important to understand and remember this: the default cnk_versioning behaviour is to delete (from database) any form or page that doesn’t have any corresponding file on the filesystem.

Back to your installing issues, check:

  • that you have a backup of your database (more precisely, txp_form and txp_pages tables).
  • that you have properly edited (configured) cnk_versioning: http://forum.textpattern.com/viewtopic.php?pid=254006#p254006
  • that, during the install process, the corresponding pages/, forms/ and css/ folders have write permission (usually 775). This is necessary only during installation, as cnk_versioning needs to be able to create (write) the files on the corresponding folders. This is something that should happen just once, so after confirming that files were successfully created (check the folders, don’t believe cnk_versioning), switch them back to read-only (usually 755).
    • if the files (pages, forms and css files) weren’t created, there is some misconfiguration somewhere (doh!). And, maybe not so obvious, that’s when disaster is about to happen: all forms, pages and css are going to be deleted on next page refresh. Why? Precisely because of cnk_versioning default behavior: to delete from database any form, page or css that it couldn’t be find on the filesystem. In other words, when cnk_versioning deletes stuff from DB, the plugin is just “doing its job”.
  • extra security tip: if your forms/ and pages/ folders are publicly accessible (ie. are below the DocumentRoot, like at public_html/forms/ or public_html/pages/), add an .htaccess file, properly configured to those folders to deny access. That way, no one will be able to access & view your forms & pages files, which hold your sensible Txp code.

The content of those .htaccess files could be just this.

Order Deny,Allow
Deny from all

La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#199 2013-08-24 13:31:07

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

Re: [plugin] [ORPHAN] cnk_versioning

Hi all.

I’ve found some time to fix a few longstanding issues on this plugin. These issues were mainly related to errors when using the filesystem path to the folder where pages, forms and css files are stored.

List of fixes:

  • the “Manually trigger Form, Page & CSS update” is working properly now. Previously, it worked, but erratically, as there were issues with filesystem paths. This functionality is exactly the same as the standard one, but it lets you manually trigger it, without having to switch the production statos to “Testing” nor having to visit a public page.
  • some aesthetic fixes that makes it look nicer in latest TXP versions.
  • I’ve added some help texts (not to the plugin help, but to the plugin interface).
  • when configuring the $CNK_VER_OUTPUT_PATH variable, now you can use an absolute filesystem path to the folder (ie. /home/mysite/public/templates/ or even /home/mysite/private/).
    If you prefer to use a relative path, know that it has to be relative to your textpattern/ folder (or admin/ folder, if you are using multi-site configuration).
    • Also, remember that this variable is configured by editing the plugin’s code. No shinny interface.
  • Remember that this modded version of the plugin also includes an option ($CNK_VER_IGNORED_NAMES) to let you specify a list of names (pages, forms, css) to be ignored. Useful when using, for example, the adi_variables plugin.

If someone has the chance to test it and give feedback, I’ll appreciate it.

# Name: cnk_versioning v0.1.7_mod (compressed)
# Type: Admin/Public side plugin
# Autoload Templates
# Author: Christian Nowak (mod by Maniqui)
# URL: http://www.cnowak.de
# Recommended load order: 5

# .....................................................................
# This is a plugin for Textpattern CMS - http://textpattern.com/
# To install: textpattern > admin > plugins
# Paste the following text into the 'Install plugin' box:
# .....................................................................

H4sIAAAAAAAAA+0ba3PbNvKz9CtgjqaUWlWy06ZtZFuNGztXzyV2xlHa3uQ8PEiELE4okgFI
y57W//12F+BLomRJVvrh5jyJTQJY7PuBB3nv4HnvT9X7vmcFfCqsQ9U7gOdR8Mm5FVJ5YeAF
N9j6Y88yDfj2omftdw46PzrT0MX3n3qWFLde2r3fs/DPDz2LJ/EklPjy3bOe9WoiPRV7PGAX
4Yx/Yk0AZ8N79pYH3ufEaxH6/RTKSaSHLc+gZRLHUa/bnc1mnVGAsB1XE3vQs1yhRtKLYoP8
AIg5SeLQD7nLBmIa+TwWCnue96xQuoLIAbjn+BeYje8jYZoOzLCxz2+Uads3DMbiLo746FOB
QaQV0ThV006EH1mHw94+Mg8iVaoAiTIODQvPXzwDMG/MmnvjJBghH464A0Gppj32fOFESeyM
wiAWQazsVqv+Z53BTzqWLYxpNrAJ9dlmDZfHvEUAGgx/GmN2zF6Ow0gExbH2zG4d1rNRRFFj
3Moa8gnwR4o4kYCd+0ocZj0P2ZOA9iWgjeE9qARoGM+kFwugISX0sDRuPPJDhd1z7Qa1nmYe
90P9oV6/8cMh91nj1cU/nd/OrpzLD4N3HwbOu5PBr+289eyPQfnNefX+faHl/B8Xl1dnp87F
yduz9yCZqumAC9s+ZN2u6Nx0mK2tJI6FDLpOnFpfN3emrl0vYkTw+C6yD+vzdGAPGA301Ltd
Nph4iqGaFJt5vs+Ggnk3QSiFy8AExF0Uyhhn96bmqV7NBczKpeT3TZu7nnPLpceHvlCk+O7X
9drpJbu4HLCz0/MB++XszeXvbPDr+Xv25vzibK/+dXepDGQsvWmzWt521251Kvt+hq6eTci9
cfMlCMIDE5ZjPhLsGPjn7tQLbLT4GnddJ5LeLThFOTrZbfug/QznqElxA24jpBPzYdOOpFDg
DhydxAYq5sGY9Vse4krgI+77Q3D1DJUz4YHrC1kxzSOAr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Vp35tEcV3MRXMfJjx2cWdd
dtBI8P/yqwMb7S3lunt0I7AY0/8eiyue/DzlPP/JBkcL0y9jcGtcJ9AWlgtjCzPLzjzXN7Nq
K0uP6L6slVGC3e352yo7M0dm25+ePdnAcK39ZexrrdM7bWHI+xa2lR43PNW0zE75F7Mss1Bv
LtvSZO/0fovZLMi+19n16jjbRQhzklrFquoo6hdpoJovLyePutGycmwekA9DGQs3h9igvihS
hwJrqM94HG+dvBmcXbHByS9vzmABREqMxneFFASaYSenp+w/JUX+h52eDM5QhQyPtg9XTaO/
SHryNPRx0TqzWKlmsjvyQx6PJs7nREg8Ivnsp/qZ84eSCkr2t+w8QqxrhNm+0hczw3STJj+X
KUazghkUiM7Wwpm9lelcYqq0GDGrmpXgcwarQ8WimW+7XZfW+1lDVvSf43cotFIzyw23uK+3
jfPMqXoj9zm9unw3b7LreczGkKmTVAL+fY5RmBevs+knyEqRE0seKG6+ngPSzaaOOdSkwfND
slucZsJjWJkPTq4GbHB1cvH+5NXg/PLi0GYdlo3oMPuQvbp8+/Z8cJgqu0Fdjop8L4YpIilu
zEvT6n48vP6ma7WzGcg389sKRVC8tTAKp1MeuA6eQuZfX+RtxBR+t1oamH+bUxq7p8/l0q0u
jUsKlfhxWuIYBS3OpqcrgxR3z8yWwxAY+bTkpkAJGszf0t+VT93n6ef1++L7g59GP+5/xw9+
GIvn+8+e/fTiYP+F+x1/7o6+H8O4h/8CBLT8+PA/AAA=

La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#200 2013-08-26 09:18:00

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

Re: [plugin] [ORPHAN] cnk_versioning

Thank you so much for doing this Maniqui. I don’t really have much call to use this plug-in anymore since my employer switched our site to a different CMS. I do however appreciate the time and effort you’ve put into to maintaining it. cnk_versioning was one of my essential Textpattern plugins, which I relied on practically every day.

Offline

#201 2014-01-25 18:22:28

shagwana
New Member
From: UK
Registered: 2009-02-03
Posts: 9
Website

Re: [plugin] [ORPHAN] cnk_versioning

I just tried installing the above v0.1.7_mod and found an error.

In function cnk_ver_push_css($css_files)…

Either a $CNK_VER_EXT needs adding as the global
or it should have been $CNK_VER_EXT_CSS

Offline

#202 2014-01-25 21:44:18

shagwana
New Member
From: UK
Registered: 2009-02-03
Posts: 9
Website

Re: [plugin] [ORPHAN] cnk_versioning

I have this plugin installed and semi-working (Textpattern v4.5.5)…

1. In textpattern folder on website make a css, forms and pages folder
2. Modify permissions so they allow writing

3. Installed plugin, then fixed the little error with…

In “function cnk_ver_push_css”
Change $CNK_VER_EXT to $CNK_VER_EXT_CSS

4. Turn the plugin on
5. Goto Presentation > Versioning tab
6. Install (no errors reported)
7. Look in database and see the file_mod_time column has been added (to txp_css, txp_form and txp_page), data intact
8. Write pages & forms to files
9. See files now exist in the above folders

10. View the website

Now the tables get emptied out and the website shows a blank page with nothing on it.

Any idea why its not reloading these files?

I have the manual uploading working and restoring the data but not the view website, the site is in testing status (not live)

Last edited by shagwana (2014-01-25 21:51:44)

Offline

#203 2014-01-25 22:31:38

shagwana
New Member
From: UK
Registered: 2009-02-03
Posts: 9
Website

Re: [plugin] [ORPHAN] cnk_versioning

Further information found….

Looks like its uploading and then deleting it.. hence the empty table!

After uncommenting the echos i see…

Form: forms/plainlinks.link.txp
Form deleted: plainlinks
Form: forms/popup_comments.comment.txp
Form deleted: popup_comments
Form: forms/search_input.misc.txp
Form deleted: search_input
Form: forms/search_results.article.txp
Form deleted: search_results
Form: forms/images.misc.txp
Form deleted: images
Form: forms/files.file.txp
Form deleted: files
Form: forms/article_listing.article.txp
Form deleted: article_listing
Form: forms/comment_form.comment.txp
Form deleted: comment_form
Form: forms/comments.comment.txp
Form deleted: comments
Form: forms/comments_display.article.txp
Form deleted: comments_display
Form: forms/default.article.txp
Form deleted: default
Page: pages/archive.txp
Page deleted: archive
Page: pages/error_default.txp
Page deleted: error_default
Page: pages/default.txp
Page deleted: default
CSS: css/default.css
CSS deleted: default

When I visit the webpage

Last edited by shagwana (2014-01-25 22:41:40)

Offline

#204 2014-01-26 16:58:46

shagwana
New Member
From: UK
Registered: 2009-02-03
Posts: 9
Website

Re: [plugin] [ORPHAN] cnk_versioning

After even more poking about I can see that the manual update done in cnk_ver_manual_update() populates $forms, $pages and $css however the auto update done in cnk_ver_textpattern() does not. The glob() command always returns empty.

Offline

Board footer

Powered by FluxBB