Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2021-03-26 21:23:05

jrmartin
Member
From: California | Italy
Registered: 2013-03-07
Posts: 108
Website

Re: A problem with Themes

Ok, I found it, but I still can’t get it to malfunction. So on a successful page, I do indeed get:

;
textpattern.Console.addMessage(["Pages updated: <strong>default</strong>.",0]);
var $html = $("<div>\n<section class=\"txp-details\" id=\"all_pages\" aria-labelledby=\"all_pages-label\">\n<h3 id=\"all_pages-label\">All pages</h3>\n\n<div role=\"group\"><ul class=\"switcher-list\"><li>\n<a href=\"?event=page&amp;name=archive&amp;_txp_token=98df8366c6f5bc71a3de6dac005f2356\">archive</a>\n</li>\n<li>\n<a href=\"?event=page&amp;name=archive-old&amp;_txp_token=98df8366c6f5bc71a3de6dac005f2356\">archive-old</a>\n<form method=\"post\" action=\"index.php\" data-verify=\"Really delete?\"><button class=\"destroy\" type=\"submit\" title=\"Delete\" aria-label=\"Delete\"><span class=\"ui-icon ui-icon-close\">Delete</span></button>\n<input name=\"event\" type=\"hidden\" value=\"page\" />\n<input name=\"step\" type=\"hidden\" value=\"page_delete\" />\n<input name=\"name\" type=\"hidden\" value=\"archive-old\" />\n<input name=\"_txp_token\" type=\"hidden\" value=\"98df8366c6f5bc71a3de6dac005f2356\" />\n</form>\n</li>\n<li class=\"active\">\n<a href=\"?event=page&amp;name=default&amp;_txp_token=98df8366c6f5bc71a3de6dac005f2356\">default</a>\n<form method=\"post\" action=\"index.php\" data-verify=\"Really delete?\"><button class=\"destroy\" type=\"submit\" title=\"Delete\" aria-label=\"Delete\"><span class=\"ui-icon ui-icon-close\">Delete</span></button>\n<input name=\"event\" type=\"hidden\" value=\"page\" />\n<input name=\"step\" type=\"hidden\" value=\"page_delete\" />\n<input name=\"name\" type=\"hidden\" value=\"default\" />\n<input name=\"_txp_token\" type=\"hidden\" value=\"98df8366c6f5bc71a3de6dac005f2356\" />\n</form>\n</li>\n<li>\n<a href=\"?event=page&amp;name=default-ii&amp;_txp_token=98df8366c6f5bc71a3de6dac005f2356\">default-ii</a>\n<form method=\"post\" action=\"index.php\" data-verify=\"Really delete?\"><button class=\"destroy\" type=\"submit\" title=\"Delete\" aria-label=\"Delete\"><span class=\"ui-icon ui-icon-close\">Delete</span></button>\n<input name=\"event\" type=\"hidden\" value=\"page\" />\n<input name=\"step\" type=\"hidden\" value=\"page_delete\" />\n<input name=\"name\" type=\"hidden\" value=\"default-ii\" />\n<input name=\"_txp_token\" type=\"hidden\" value=\"98df8366c6f5bc71a3de6dac005f2356\" />\n</form>\n</li>\n<li>\n<a href=\"?event=page&amp;name=default_old&amp;_txp_token=98df8366c6f5bc71a3de6dac005f2356\">default_old</a>\n<form method=\"post\" action=\"index.php\" data-verify=\"Really delete?\"><button class=\"destroy\" type=\"submit\" title=\"Delete\" aria-label=\"Delete\"><span class=\"ui-icon ui-icon-close\">Delete</span></button>\n<input name=\"event\" type=\"hidden\" value=\"page\" />\n<input name=\"step\" type=\"hidden\" value=\"page_delete\" />\n<input name=\"name\" type=\"hidden\" value=\"default_old\" />\n<input name=\"_txp_token\" type=\"hidden\" value=\"98df8366c6f5bc71a3de6dac005f2356\" />\n</form>\n</li>\n<li>\n<a href=\"?event=page&amp;name=error_default&amp;_txp_token=98df8366c6f5bc71a3de6dac005f2356\">error_default</a>\n</li></ul>\n</div>\n</section></div>");
$("#all_pages").replaceWith($html.find("#all_pages"));
var $html = $("<div>\n<div class=\"txp-form-field name\">\n<div class=\"txp-form-field-label\"><label for=\"new_page\">Page name</label></div>\n<div class=\"txp-form-field-value\">\n<input name=\"newname\" pattern=\"^(?=[^.\\s])[^\\x00-\\x1f\\x22\\x26\\x27\\x2a\\x2f\\x3a\\x3c\\x3e\\x3f\\x5c\\x7c\\x7f]+\" class=\"input-medium\" id=\"new_page\" type=\"text\" size=\"16\" required=\"required\" placeholder=\"Required\" value=\"default\" /></div>\n</div>\n<input name=\"name\" type=\"hidden\" value=\"default\" />\n<input name=\"skin\" type=\"hidden\" value=\"2021 Update\" />\n<input name=\"event\" type=\"hidden\" value=\"page\" />\n<input name=\"step\" type=\"hidden\" value=\"page_save\" /></div>");
$("div.name").replaceWith($html.find("div.name"));
$("#new_page,#main_content input[name=name]").val("default");

Offline

#14 2021-03-26 21:33:56

etc
Developer
Registered: 2010-11-11
Posts: 4,253
Website GitHub

Re: A problem with Themes

That looks right (though ugly). The next time the ghosts show their noses, try to see if something changes here.

Offline

#15 2021-03-27 11:58:33

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,347
Website

Re: A problem with Themes

jrmartin

When you open the developper tools, Network pane, is the Disable Cache item checked ? It is an entry on the secondary toolbar, on the right hand side. If it is, that might (eventually) partly explain a successful save when the developper tools are open (caching is disabled). Other people have reported similar behaviour, I had recently some problems saving the content of text fields on the Edit Image panel.


Where is that emoji for a solar powered submarine when you need it ?

Offline

#16 2021-03-27 14:54:03

jrmartin
Member
From: California | Italy
Registered: 2013-03-07
Posts: 108
Website

Re: A problem with Themes

The disabled cache is not checked. In fact, I worked on the site all day yesterday updating pages without incident and got the bulk of the work done. This morning, it got all wonky on me until I cleared the browser cache, and then I could switch between themes and save pages again. Weird.

j

Offline

Board footer

Powered by FluxBB