Skip to content

Dependencies on datasource-parameters don't seem to work #38

Open
@twiro

Description

@twiro

A remote datasource doesn't seem to properly set other datasource-parameters that are used in the remote-datasource-url as dependencies.

This seems to be a bug, because the remote datasource won't work as expected if the needed datasource-parameter isn't available at the execution time of the remote-datasource.

Example

The url for my remote datasource looks like this:

 http://api.domain.com/downloads/{$ds-page.system-id}/

The datasource-parameter $ds-page.system-id is created by another datasource that's attached to the same page.

When trying to make this work I didn't get any results from the remote datasource because the parameter $ds-page.system-id wasn't available. I needed to manually add it as a dependency to the __construct-function to make the remote datasource work as expected:

public function __construct($env=NULL, $process_params=true)
{
    parent::__construct($env, $process_params);
    $this->_dependencies = array(
        '$ds-page.system-id'
    );
}

Setup:

  • Symphony 2.7.2
  • Remote Datasource 2.3.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions