Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#109 2011-06-19 07:29:08

hotwebmatter
Member
From: Providence, RI, USA
Registered: 2011-06-17
Posts: 21
Website

Re: [plugin] [ORPHAN] cnk_versioning

@Gocom:

You have changed a variable to a constant by removing a dollar sign. r[‘css’] should be $r[‘css’].

Good eye, sir! I had already fixed it myself by the time I read this, but thank you nonetheless!


Well’s all that ends.

Offline

#110 2011-06-19 07:33:15

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [plugin] [ORPHAN] cnk_versioning

You make everything so unnecessarily complicated.

hotwebmatter wrote:

Are you sure that Textpattern no longer stores CSS as base64-encoded in the database?

Yes, I’m sure. Otherwise I wouldn’t have said so. More specifically see r3300.

Actually, first I should restore the base64 functions to the cnk_versioning plugin and see whether everything works correctly.

No it won’t as Textpattern doesn’t use base64 encoding, and won’t decode the base64 encoded strings. You are just going to f’up the styles.

it may have occurred last night when I upgraded Textpattern from 4.4.0 to 4.4.1

4.4.1 upgrade won’t touch styles stored in the database, and it’s unlikely that would be the cause. It’s more likely caused by the plugin.

Last edited by Gocom (2011-06-19 07:37:40)

Offline

#111 2011-06-20 00:29:34

hotwebmatter
Member
From: Providence, RI, USA
Registered: 2011-06-17
Posts: 21
Website

Re: [plugin] [ORPHAN] cnk_versioning

@Gocom:

You make everything so unnecessarily complicated.

Guilty as charged. I’ll try to cut down on long incoherent posts like the one I made last night. (Better yet, I’ll try to stop staying up so late at night that I get verbose and incoherent!)

I did restore from the last mysqldump, which I made after upgrading to 4.4.1 but before installing cnk_versioning. I got all my old styles back, but I also lost cnk_versioning for the moment. I think everything will go much more smoothly when I re-install the plugin. I’ve manually created files in the versions directory from the two active stylesheets in the database, and I’m going to make sure that I back up that folder elsewhere, so that I can restore it if those files get clobbered. Also, I’ll make certain this time that I remove the base64 functions from cnk_versioning 0.1.7 before I enable it.

By the way, sorry for posting so many irrelevant red herrings — I think the base64-encoding was probably caused by the mem_templates plugin, which I had initially used to install the theme. At any rate, its import($dir) function contains these lines:

if ($type == 'css') {
    $data = base64_encode(implode('', $data));
}

Does that look like it is related?


Well’s all that ends.

Offline

#112 2011-06-20 10:45:26

AdamK
Member
From: Kraków, Poland
Registered: 2009-08-11
Posts: 47

Re: [plugin] [ORPHAN] cnk_versioning

Hello

I have a strange problem: I’ve created all the three folders, I’ve given 777 to them (linux host) and still I get

Folder "/forms/" is not writable.
Folder "/pages/" is not writable.
Folder "/css/" is not writable.

I use multisite installation, TXP 4.4.1

$CNK_VER_OUTPUT_PATH = ‘_templates/versioning/’;

which, as I suppose, should be read as

~/public_html/textpattern/sites/sitename.pl/public/_templates/versioning

versioning folder is 777 as well

I have no clue…

Adam

Last edited by AdamK (2011-06-20 10:45:54)

Offline

#113 2011-06-20 16:57:13

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

Re: [plugin] [ORPHAN] cnk_versioning

Hi Adam.
Try:

$CNK_VER_OUTPUT_PATH = ‘public/_templates/versioning/’;


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#114 2011-06-21 01:15:38

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: [plugin] [ORPHAN] cnk_versioning

$CNK_VER_OUTPUT_PATH = ‘public/_templates/versioning/’;

It didn’t work for me until I used a folder inside the main Textpattern folder. That’s what the instructions appear to require – as I read them anyway. By the time I figured it out all the forms/pages/css were deleted from the site I was working on but nothing had been replaced by cnk_versioning.

Offline

#115 2011-06-21 01:29:14

artagesw
Member
From: Seattle, WA
Registered: 2007-04-29
Posts: 227
Website

Re: [plugin] [ORPHAN] cnk_versioning

I’m interested in hearing use cases for cnk_versioning. Are you using it so that you can easily version your code in an external version control system (subversion, git, mercurial, etc.)? Or are you using it simply as a way to avoid building your site’s code within the Textpattern admin interface (i.e. you simply want to use an external text editor or IDE)? Or both? Or some other reason(s)?

Offline

#116 2011-06-21 02:00:15

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

Re: [plugin] [ORPHAN] cnk_versioning

jstubbs wrote:

It didn’t work for me until I used a folder inside the main Textpattern folder. That’s what the instructions appear to require – as I read them anyway. By the time I figured it out all the forms/pages/css were deleted from the site I was working on but nothing had been replaced by cnk_versioning.

It’s not required— I always keep my templates in a directory nested within the DocumentRoot outside the textpattern directory.

artagesw wrote:

I’m interested in hearing use cases for cnk_versioning. Are you using it so that you can easily version your code in an external version control system (subversion, git, mercurial, etc.)? Or are you using it simply as a way to avoid building your site’s code within the Textpattern admin interface (i.e. you simply want to use an external text editor or IDE)? Or both? Or some other reason(s)?

Those are the two main reasons I use cnk_versioning. Building a site entirely using Textmate + the TXP Bundle (or sometimes Espresso), and being able to refresh my browser to see the changes, is especially useful to me.

Offline

#117 2011-06-21 02:10:11

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

Re: [plugin] [ORPHAN] cnk_versioning

jstubbs wrote:

$CNK_VER_OUTPUT_PATH = ‘public/_templates/versioning/’;

It didn’t work for me until I used a folder inside the main Textpattern folder.

Maybe.
I currently have configured it to use a folder inside /admin (on a multi-site install), and I can confirm that it doesn’t work in any location, afaicr. In any case, I’m currently using an slightly modded version.

artagesw wrote:

I’m interested in hearing use cases for cnk_versioning. Are you using it so that you can easily version your code in an external version control system (subversion, git, mercurial, etc.)? Or are you using it simply as a way to avoid building your site’s code within the Textpattern admin interface (i.e. you simply want to use an external text editor or IDE)? Or both? Or some other reason(s)?

Both main reasons, and on top of them, for making teamwork and deployment easier.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#118 2011-06-21 04:25:11

artagesw
Member
From: Seattle, WA
Registered: 2007-04-29
Posts: 227
Website

Re: [plugin] [ORPHAN] cnk_versioning

maniqui wrote:

…and on top of them, for making teamwork and deployment easier.

and how does it help with this, exactly?

Offline

#119 2011-06-21 04:57:10

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [plugin] [ORPHAN] cnk_versioning

maniqui wrote:

Both main reasons, and on top of them, for making teamwork and deployment easier.

Same.

Even when auto-deployments (from the repo directly) and version control system isn’t required, the editor doesn’t support multiple active authors and doesn’t prevent overwrites. But even it did… it wouldn’t change what I personally use. I do use the admin-side editor when working alone (storing the actual end-results in svn/git), but most of the time not when working with others. Using version control system is must and cnk_versioning (and similar tools) are the easiest way of doing it.

Offline

#120 2011-06-21 05:23:47

artagesw
Member
From: Seattle, WA
Registered: 2007-04-29
Posts: 227
Website

Re: [plugin] [ORPHAN] cnk_versioning

I have never tried the plugin, so I may be missing something. But how does it prevent overwrites or conflicts between multiple authors? It seems that the plugin simply reads/writes a shared file system on the server instead of the database. How do you provide multiple authors with access to this shared space without conflicts?

Offline

Board footer

Powered by FluxBB