Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#85 2009-03-19 20:14:46

magrio
Member
From: México
Registered: 2008-07-19
Posts: 12
Website

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

brunodario dijo:

@magrio: What version of txp are you using? Maybe the plugin stoped working on txp 4.0.8, anyone eles?

Hi, thanks for your answer!!!
I tried with 4.0.6, and when updated to 4.0.8 the plugin works in front side (I used only a couple features), but this problem still… only I an edit an article when the plugin is disabled.
Obviously now i have the plugin disabled, but i want to enableit becouse is an powerfull tool fot the site i am developing.

Thanks a lot!

Last edited by magrio (2009-03-19 20:16:22)

Offline

#86 2009-04-10 21:26:21

floodfish
Member
From: Brooklyn, NY
Registered: 2007-01-11
Posts: 155
Website

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

This seems to not work with 4.0.8 … it breaks the display of the section page (the tree is duplicated up in the top menu, making a nice fat yellow section) and the dropdowns to select parents aren’t visible.

Offline

#87 2009-05-29 14:30:07

readingtype
New Member
Registered: 2009-05-28
Posts: 8

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

Hi all,

I’ve started investigating what’s wrong. First step was find all the calls the plugin makes to Textpattern functions and then diff each function declaration’s first line to see if the args have changed between 4.0.6 (supports the plugin) and 4.0.8 (doesn’t). Result: no changes there. So I’ll need to diff the functions themselves.

If anyone has evidence to show what is wrong, it would be welcome. This is a very handy plugin ;-)

Cheers
Ben

Offline

#88 2009-05-29 15:30:34

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

Jquery’s depricated “@” selector could (partially) be the culprit.

Offline

#89 2009-05-29 15:38:59

readingtype
New Member
Registered: 2009-05-28
Posts: 8

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

mrdale wrote:

Jquery’s depricated “@” selector could (partially) be the culprit.

Aha. Would that be possible if there were no Javascript in the plugin’s code?

Offline

#90 2009-05-29 15:54:57

readingtype
New Member
Registered: 2009-05-28
Posts: 8

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

mrdale wrote:

Jquery’s depricated “@” selector could (partially) be the culprit.

I wrote:

Aha. Would that be possible if there were no Javascript in the plugin’s code?

OK, sorry, I have been looking at the code too closely and forgotten what’s actually in it ;-)

I see some moderately intriguing javascript being inserted in the section admin page, but I’ve not yet spotted any code with attributes that could be selected with “@” being inserted, or any use of the “@” selector by the inserted javascript. I’m looking strictly at the code, rather than the rendered page, when I say that…

Offline

#91 2009-05-29 17:56:36

readingtype
New Member
Registered: 2009-05-28
Posts: 8

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

OK, I have the section admin page showing the section links in the right part of the header and the section parent drop-downs are also back. Things seem to work, but I have no evidence that anything else is right or wrong.

It looks from this thread as though all the public-facing parts of the plugin were unaffected by the version change, and that would be consistent with the fact that the ‘broken’ code relied on finding HTML in the section admin page that has been modified.

I’ve contacted Netcarver who appears to have taken charge of the plugin (see this Github page) to find out whether he’d like to incorporate the changes.

Offline

#92 2009-05-29 18:06:06

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

readingtype wrote:

I’ve contacted Netcarver who appears to have taken charge of the plugin (see this Github page) to find out whether he’d like to incorporate the changes.

And he has replied to your message :-)


Steve

Offline

#93 2009-05-29 23:52:42

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

Just updated my plugin to version 0.3.10. It works with 4.0.8 now!

- There are 2 new attributes for the breadcrumb and the section tag: show_default and default_title.

- Included a switch to disable section dropdown customizing on the write tab, for users who experience problems when cnk_section_tree is enabled

- Fixed a major rendering bug (closing tags)

Please read my comment on the first post of this thread!

PS: As far as I know, net-carver doesn’t take charge of any of my plugins.

Last edited by chriloi (2009-05-29 23:53:01)

Offline

#94 2009-05-30 17:59:07

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

Yay, works.

Offline

#95 2009-05-31 09:51:48

readingtype
New Member
Registered: 2009-05-28
Posts: 8

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

chriloi wrote:

Just updated my plugin to version 0.3.10. It works with 4.0.8 now!

Many thanks, Christian :-)

Offline

#96 2009-06-24 14:04:22

readingtype
New Member
Registered: 2009-05-28
Posts: 8

Re: [plugin] [ORPHAN] cnk_section_tree - subsection plugin

Hi,

The 0.3.10 version is working great. But I just had some problems with blank screens on the ‘write’ admin page for some articles and not for others. I amended the regexp in cnk_write_inject. You can try this version of the function if you have a similar experience – @chriloi may have a better solution.

function cnk_write_inject($buffer) 
{ 
	global $DB;
	if(!isset($DB)) $DB = new db; 
	if(!isset($prefs)) $prefs = get_prefs();
	// replace section dropdown TODO: tidy up regexp! 
	$pattern = '#name="Section".*</select></p>#sU'; 
	if (gps('step') == 'edit') $pattern = '#(name="Section".*<option value="([\w\s-]*)" selected="selected">.*</select></p>)#s';
	$insert = 'cnk_st_dropdown_article'; 
	$buffer = preg_replace_callback($pattern, $insert, $buffer); 
	return $buffer; 
}

Incidentally I think that the regular expression may have been matching enough of the buffer to cause some kind of memory problem. I have not attempted to verify that explanation though.

Offline

Board footer

Powered by FluxBB