Search

Hey everyone, it seems every time I got to my site and try to access 'http://stephenkorecky.com/articles/' it results in a error 404, however the page is created. Now here is where I can "solve the problem" if I remove Articles from the data sources, so I think there is a problem with my data source, if anyone find anything wrong, could you please help me out? Here is the code:

<?php

require_once(TOOLKIT . '/class.datasource.php');

Class datasourcearticles extends Datasource{

    public $dsParamROOTELEMENT = 'articles';
    public $dsParamORDER = 'desc';
    public $dsParamLIMIT = '5';
    public $dsParamREDIRECTONEMPTY = 'yes';
    public $dsParamREQUIREDPARAM = '$entry';
    public $dsParamPARAMOUTPUT = 'system:id';
    public $dsParamSORT = 'date';
    public $dsParamSTARTPAGE = '1';

    public $dsParamFILTERS = array(
            '26' => '{$entry}',
            '30' => 'yes',
    );

    public $dsParamINCLUDEDELEMENTS = array(
            'title',
            'body',
            'date'
    );

    public function __construct(&$parent, $env=NULL, $process_params=true){
        parent::__construct($parent, $env, $process_params);
        $this->_dependencies = array();
    }

    public function about(){
        return array(
                 'name' => 'Articles',
                 'author' => array(
                        'name' => 'Stephen Korecky',
                        'website' => 'http://stephenkorecky.com',
                        'email' => 'skorecky@gmail.com'),
                 'version' => '1.0',
                 'release-date' => '2009-01-14T02:13:30+00:00');    
    }

    public function getSource(){
        return '6';
    }

    public function allowEditorToParse(){
        return true;
    }

    public function grab(&$param_pool){
        $result = NULL;

        include(TOOLKIT . '/data-sources/datasource.section.php');

        if($this->_force_empty_result) $result = $this->emptyXMLSet();
        return $result;
    }
}

It seems you've told it to redirect to a 404 page when the datasource returns nothing, could that be the problem?

Ah yes! Thanks, simple mistake. Thanks for pointing that out, I guess that's the default setting.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details