Announcement

Symphony's issue tracker has been moved to Github.

Issues are displayed here for reference only and cannot be created or edited.

Browse

Closed#531: Error on re-saving Authors DS

in_array() expects parameter 2 to be array, null given
/home/nils/Server/local/symphony-2/symphony/content/content.blueprintsdatasources.php line 565

560
561         $label = Widget::Label(__('Included Elements'));
562
563         $options = array(
564             array('label' => __('Authors'), 'options' => array(
565                     array('username', ($fields['source'] == 'authors' && in_array('username', $fields['xml_elements'])), 'username'),
566                     array('name', ($fields['source'] == 'authors' && in_array('name', $fields['xml_elements'])), 'name'),
567                     array('email', ($fields['source'] == 'authors' && in_array('email', $fields['xml_elements'])), 'email'),
568                     array('author-token', ($fields['source'] == 'authors' && in_array('author-token', $fields['xml_elements'])), 'author-token'),
569                     array('default-area', ($fields['source'] == 'authors' && in_array('default-area', $fields['xml_elements'])), 'default-area'),

Steps to reproduce:

  1. Create an Authors DS and save it
  2. Click “Save changes” again

I couldn’t reproduce your original bug phoque, but I did come across another one that may of been related, so I’ve fixed that

What does your Datasource look like? Below is mine.

Class datasourceauthor_ds extends Datasource{

    public $dsParamROOTELEMENT = 'author-ds';
    public $dsParamORDER = 'desc';
    public $dsParamREDIRECTONEMPTY = 'no';
    public $dsParamSORT = 'id';



    public $dsParamINCLUDEDELEMENTS = array(
            'username',
            'name'
    );

For me the fix solves this issue (#531 ) as well.

Phoque?

Got it! Trick was the save the datasource without any elements. Also fixes an issue where you could enter anything into the pagination fields.

Fixed in this commit

Got it! Trick was the save the datasource without any elements.

Yes, I just got that too.

Fixed in this commit

Great, thanks!

This issue is closed.

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