Skip to content

No data set exists with the ID: xxx #349

@outline4

Description

@outline4

Description

Hi,

I am in a multisite environment. this has caused many other problems with craft commerce etc.

I try to execute a custom twig template report and run into an error when trying to display the results.

Displaying the options works.

How to reproduce

for instance: https://www.mysite.ch/backend/sprout/data-studio/view/142145?site=deCH

it generates the following error:

No data set exists with the ID: 142145

1. in /home/ingwere1/ingwerer.ch/vendor/barrelstrength/sprout/src/datastudio/controllers/DataSetController.phpat line 214

$dataSetId = $request->getBodyParam('dataSetId');
    $settings = $request->getBodyParam('settings');

    $dataSet = new DataSetElement();

    if ($dataSetId && $settings) {
        $dataSet = Craft::$app->getElements()->getElementById($dataSetId, DataSetElement::class);

        if (!$dataSet instanceof DataSetElement) {
            throw new NotFoundHttpException('No data set exists with the ID: ' . $dataSetId);
        }

        $currentUser = Craft::$app->getUser()->getIdentity();
        $dataSource = $dataSet->getDataSource();

        if (!$currentUser->can(DataStudioModule::p('editDataSet:' . $dataSource::class))) {
            throw new NotFoundHttpException('User does not have permission to access Data Set: ' . $dataSetId);
        }

It's hard to continue debug the output template.

Sprout Version

latest

Craft Version

latest

Database Type Version

mysql

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions