I don’t know where this comes from, but when I try to update from 1.1 to 1.2 I have an error message :
Precondition Failed
The precondition on the request for the URL /fuchslock/manager/index.php evaluated to false.
It never happened and it does not happen with other snippets. I didn’t modify anything or add a space at the end or whatever.
Anyone ?
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
Odd. Never had that happen..........
No idea what could be causing that.
New Version 2.0!
* 25-Nov-2005 added multisort capabilities (Jason/Mark)
* 25-Nov-2005 added ability to call useful parts of the document object in a template via [+documentobject+] (Mark)
-
☆ A M B ☆
- 24,524 Posts
Interesting. I’ve modded my version to allow the sort field to be specified in an argument; I check it against the column names in the table and go to default if an invalid value was used. It uses the original query with no problems. So you can specify any column in the site_content table to sort by. I also added the option to specify asc or desc.
$results = $modx->db->query("show columns from ".$modx->getFullTableName('site_content'));
while($dbfield = $modx->db->getRow($results))
$dbfields[] = $dbfield['Field'];
if(isset($sortby) AND in_array($sortby,$dbfields)) {
$sortby = $sortby;
} else {
$sortby = "createdon";
}
// check for valid field to sort by
$sortdir = isset($sortdir) ? strtoupper($sortdir) : "DESC";
// get sort dir
$output = '';
// initialize the blog variable
$callby = ($showPublishedOnly)? 'getActiveChildren' : 'getAllChildren';
$resource = $modx->$callby($resourceparent, $sortby, $sortdir, $fields='id, pagetitle, longtitle, description, introtext, content, createdon, createdby, hidemenu');
I still have this error when trying save the 2.0 version... I did some looking into the error message and I found :
412 Precondition Failed : The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server.
I am hosted @TextDrive and never had a problem like this before... I updated the snippet via phpMyAdmin in the meantime...
(For reference I run MODx 0.9.0)
Quote from: Mark at Nov 25, 2005, 02:21 PM
Odd. Never had that happen..........
No idea what could be causing that.
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
Is your error for just this snippet or any snippet?
If its just this snippet try breaking it up into little pieces until it won’t save. Let me know which piece fails and we’ll take it from there.
No, every other snippet is OK, just this one. I already had this error when trying to update to 1.2, in fact...
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
Does it support tv in the new v2.0 of newslisting snippet?
When it said document object, does it mean the default from MODx or including TV.
If it’s not supported yet, will there be any possibility where it will be implemented later?
Thanks
Regards,
Wendy Novianto
TV’s are not supported yet in NewsListing, but they *hopefully* will be soon.