Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2016-05-07 14:13:19
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,208
Plugins broken in 4.6
Edit: Aside from restructured admin HTML, there are some code changes in Textpattern 4.6 that might lead to misbehaving plugins. Some nice people (Bloke, ruud and michaelkpate) have set up forum posts in order to bring possible plugin issues to your attention and offer fixes for those. Here’s the list of these postings:
Tag registering 1 (basic examples)
Tag registering 2 (advanced examples)
NULLDATETIME
Converting plugins to mysqli
——————— ORIGINAL POST ———————
esq_sectionsort
Broken feature: Sorting of categories
Can be fixed with:
Find
#category_container .category-tree > .categorysort:first-child {
Replace by
#category_article_form > .categorysort:first-child,
#category_image_form > .categorysort:first-child,
#category_file_form > .categorysort:first-child,
#category_link_form > .categorysort:first-child {
________________________________________________________________________________________
Find
#category_container .category-tree p .handle {
Replace by
#category_article_form p .handle,
#category_image_form p .handle,
#category_file_form p .handle,
#category_link_form p .handle {
________________________________________________________________________________________
Find
$('#category_container .category-tree').each(function() {
Replace by
$('#category_article_form,
#category_image_form,
#category_file_form,
#category_link_form').each(function() {
________________________________________________________________________________________
Some cosmetics:
Find second instance of
set_message('Section order saved OK', 'success')
Replace by
set_message('Category order saved OK', 'success')
________________________________________________________________________________________
Find second instance of
set_message('Section order save failed', 'error');
Replace by
set_message('Category order save failed', 'error');
________________________________________________________________________________________
Remove
.css('table-layout', 'fixed')
(Keeps the section table from shrinking in 4.6 when toggling “Show details”.)
________________________________________________________________________________________
Find
$('#section_container thead tr').prepend('<th style="width: 30px;">Sort</th>').find('th').each(function() {
Replace by
$('.txp-list th').removeClass('asc').removeClass('desc');
$('#section_container thead tr').prepend('<th style="width: 30px;">Sort</th>').find('th').each(function() {
(Removes the classes for chosen table sorting column headers in the Sections panel. You can’t sort that table, when the plugin is installed.)
Edit: Added the last two cosmetic fixes.
Last edited by uli (2016-12-02 19:11:18)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#2 2016-05-07 14:27:52
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,208
Re: Plugins broken in 4.6
stm_article_order
Broken feature:
Completely broken
Can be fixed with:
Hopefully: some compatibility changes to adapt the plugin to Textpattern 4.6’s current jQuery version (v1.12.3). It works again as soon as Textpattern 4.5.7’s jQuery v1.8.3 is used in /textpattern/lib/txplib_head.php
If you know what changes need to be done, please post here. Thanks. done
Last edited by uli (2016-12-02 19:10:16)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#3 2016-05-09 09:57:46
- Bloke
- Developer
- From: Leeds, UK
- Registered: 2006-01-29
- Posts: 8,833
- Website
Re: Plugins broken in 4.6
[stm_article_order] If you know what changes need to be done, please post here.
The primary issue is that jQuery.browser
no longer exists so browser detection is out. Trawl the code for any mention of jQuery.browser
and remove / replace it. List of possible fixes are below. Note that ones marked with an asterisk may potentially break Opera, so require testing.
Lines 390 + 391: remove check for Opera*
x += el.offsetLeft + (el.currentStyle ?parseInt(el.currentStyle.borderLeftWidth)||0:0);
y += el.offsetTop + (el.currentStyle ?parseInt(el.currentStyle.borderTopWidth)||0:0);
Lines 619, 677, and 1056: remove reference to jQuery.browser.msie
and use a different IE-specific check (does it support ActiveX)
if(window.ActiveXObject) {
Lines 752 + 753: remove reference to jQuery.browser.msie
and Opera-specific test*
elm.dragCfg.oC.x = elm.offsetLeft + (window.ActiveXObject ? 0 : parentBorders.l);
elm.dragCfg.oC.y = elm.offsetTop + (window.ActiveXObject ? 0 : parentBorders.t);
That at least allows dragging again, but as I say, there are Opera-specific tests that have been removed, which may need to be addressed with some clever tests. With luck, the tests may not be required any more since Opera changed their rendering engine. Whether there’s anything more that needs fixing after that remains to be seen.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#4 2016-05-09 13:48:45
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,208
Re: Plugins broken in 4.6
Ah, Stef, thanks! That brought it back to life. During the weekend I’ve tried to follow some blog tips but only tore my hair, so I ended up dropping in the migrate plugin, for the cost of yet another 10kb. Much better now!
Need to align some changes with the stm_ao-migrate version now and see what happened with the GIF/PNG part that got lost somewhere (not contained in v0.3). And throw in again Claire/cbe’s change, and then it’s ready for some nice folks that want try the mangy beast, esp. on Opera.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#5 2016-06-03 16:56:16
- jpdupont
- Member
- From: Virton (BE)
- Registered: 2004-10-01
- Posts: 752
- Website
Re: Plugins broken in 4.6
What about Jukka plugins ?
rah_knots and
rah_post_versions
don’t works well.
rak_knots = save only on the write tab (not on page or form)
rah_post_version = many mysql errors.
Offline
#6 2016-06-03 17:31:22
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,208
Re: Plugins broken in 4.6
jpdupont wrote #299489:
rah_knots
That’s an easy “fix” (if it’s not that way by design):
Look for (2 x)
$('form .publish')
Replace by (2 x)
$('form .publish, #page-form .publish, #page-page .publish, #page-css .publish')
rah_post_versions
IIRC Jukka has announced to drop support for that plugin some years ago. Personally, I’ve regretted that and I still do. I hope someone wants to fix that plugin and make it available to the community.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#7 2016-06-04 07:48:48
- jpdupont
- Member
- From: Virton (BE)
- Registered: 2004-10-01
- Posts: 752
- Website
Re: Plugins broken in 4.6
@uli
I don’t know if it’s really correct but this modification seems to work :
$setid = safe_insert(
'rah_post_versions_sets',
"modified=now(),
changes=1,
title='".doSlash($title)."',
event='".doSlash($event)."',
step='".doSlash($step)."',
grid='".doSlash($grid)."'"
);
// $setid = mysql_insert_id();
Move the $setid =
before the safe_insert ...
and comment the $setid = mysql_insert_id();
Offline
#8 2016-06-04 15:26:40
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,208
Re: Plugins broken in 4.6
Hi, Jean-Pol, that’s a good one, thanks! My most important fields are working (forms, pages, CSS). Except for article, which will become the most important one once the website is handed over to the clients. Did article save ever work in rah_post_versions after the move to AJAX saving? (Very likely I didn’t use it any more because of that but I really can’t remember.)
I’ve a vague feeling it might simply be the the ident code for article in the plugin preferences:
case "article":
$grid = rah_post_versions_id();
$title = gps("Title");
break;
But I’ve no idea what to change about that.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#9 2016-06-04 16:36:53
- jpdupont
- Member
- From: Virton (BE)
- Registered: 2004-10-01
- Posts: 752
- Website
Re: Plugins broken in 4.6
Yes.
maybee in this list article:edit, article:create, article:publish, article:save,
because it seems the event is not fired for article
.
Offline
#10 2016-06-04 20:45:16
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,400
Re: Plugins broken in 4.6
uli wrote #299519:
Did article save ever work in rah_post_versions after the move to AJAX saving?
No, only the first time when it was published.
Last edited by GugUser (2016-06-05 02:41:58)
Offline