Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
twiro opened this issue Mar 7, 2018 · 1 comment
Open

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

twiro opened this issue Mar 7, 2018 · 1 comment
Assignees

Comments

@twiro
Copy link

twiro commented Mar 7, 2018

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
@nitriques nitriques self-assigned this Mar 16, 2018
@nitriques
Copy link
Member

Thanks @twiro I agree that it would be nice to support this, since it is a "standard" feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants