« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed - Unknown column ’Imuthes’ in ’where clause’ »
SQL: SELECT alias FROM `db246662437`.`jvkcms_site_content` WHERE `id` = Test-File.pdf
$document = $modx->db->select('alias', $site_content, "`id` = $id");
$document = $modx->db->select('alias', $site_content, "`id` = '$id'");
// Get download count for requested document.
if ($action == 'count')
{
$filename = isset($filename) ? $filename : Download::GetAlias($id);
if ($modx->config['friendly_urls'] && $modx->config['friendly_alias_urls'])
{
$_pIds = $modx->getParentIds($id);
foreach($_pIds as $pId)
{
$_alias = Download::GetAlias($pId);
$_aliaspath[] = (!$_alias) ? $pId : $_alias;
}
$filename = implode("/",$_aliaspath)."/".$filename;
}
return Download::Count($filename, $_table, $dberror, $nofile);
}
Thanks again. Hhm, I’m still not getting this to work, even with your script. If I change the template accordingly and put a snippet call in the site where I want to provide downloads, Firefox ask to download the whole site when clicking the link that should carry the user there. So, it seems I’ll finally have to have someone investigate this further directly on my site / code if I can find someone. Thanks anyway, again!
Regards, Ruceb
I left the TV set to ’force-download’