Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#205 2014-01-27 21:10:28

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

Re: [plugin] [ORPHAN] cnk_versioning

Yet more progress…

It looks like the manual upload is taking files from within the textpattern/ install but the auto upload screen refresh is taking them from the www/ (root folder). I figure this should be fixable!.

Offline

#206 2014-01-27 21:20:06

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

Re: [plugin] [ORPHAN] cnk_versioning

Did it, well after all my poking about above it looks like all I needed to do was set $CNK_VER_OUTPUT_PATH = ‘textpattern/’

This points it to the textpattern default install and then the public page can find the files!

To be more exact, the $CNK_VER_OUTPUT_PATH should be set to the computers path for the location of the CSS, Pages and Forms folder. eg: ‘/wamp/www/’ to locate ‘c:/wamp/www’.

After all my diddlings, there is still a known bug (above where you need to add _CSS to something)

Last edited by shagwana (2014-01-28 06:59:20)

Offline

#207 2014-02-28 19:57:24

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

Re: [plugin] [ORPHAN] cnk_versioning

John Smith wrote #270114:

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.

I’ll throw in my 2 cents on this since i’m using this on just about every site now.

  1. - I’ve found that giving the path from your DOCUMENT_ROOT works more times than if I give the path as relative, usually i get the “xxx folder is not writable”. SO what I do is have the path setup as:
$CNK_VER_OUTPUT_PATH = rtrim(getenv('DOCUMENT_ROOT'),'/') . '/textpattern/_templates/versioning/'; //e.g. 'textpattern/_templates/versioning/'
  1. - before your enable the plugin make sure your production mode is in “live”, this way when you do the install the plugin wont nuke all your forms/pages/css and leave you with a blank page.

Once your ready for development switch from “live” to “testing” to update the database with your template files.

Offline

#208 2014-07-13 08:33:34

Ciges
Member
From: Vigo (España)
Registered: 2013-08-21
Posts: 12

Re: [plugin] [ORPHAN] cnk_versioning

Thanks you very much @ecklesroad!

I have just installed cnk_versioning in my recently installed Textpattern (dev, rev5854) web with success :-)

There was an error in the php code, easily to solve. Global variable $CNK_VER_EXT is not defined in cnk_ver_push_css function.

Line 244 should be:

	global $CNK_VER_OUTPUT_PATH, $CNK_VER_EXT, $CNK_VER_EXT_CSS, $CNK_VER_IGNORED_NAMES;

Last edited by Ciges (2014-07-13 09:01:39)

Offline

#209 2015-04-04 23:37:01

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,526
Website

Re: [plugin] [ORPHAN] cnk_versioning

I just installed the plugin and
1) nothing has happened in terms of writing my files to a directory
2) there is no readme/help message as there was as i recall when i tried a few years ago.

Is this plugin safe to run… i am on Textpattern · 4.5.7

PS is there another option to use external files for forms, pages, css etc?


…. texted postive

Offline

#210 2015-04-05 00:12:55

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

Re: [plugin] [ORPHAN] cnk_versioning

You can try rah_flat.
cnk_versioning still works on TXP 4.5.7, but I think you should consider its development abandoned.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB