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

fix Unsupported pivot dimension when switching between related event reports #14348

Merged
merged 1 commit into from May 20, 2019

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Apr 14, 2019

fix #9716

I actually tried to fix it by changing eg

class GetCategoryFromNameId extends Base
{
    protected function init()
    {
        parent::init();

        $this->dimension     = new EventCategory();
        $this->name          = Piwik::translate('Events_EventCategories');
        $this->isSubtableReport = true;
    }
}

to

class GetCategoryFromNameId extends Base
{
    protected function init()
    {
        parent::init();

        $this->dimension     = new EventCategory();
        $this->name          = Piwik::translate('Events_EventCategories');
        $this->isSubtableReport = true;
        $this->parameters = array('secondaryDimension' => 'eventName')
    }
}

so the report has its own unique id and the viewDataTables will be only applied to this report. The problem though is that this doesn't quite work with our report factory which would always use the GetCategory report etc.

The easy workaround is to simply not store the pivoted view data table option when switching between related reports.

@tsteur tsteur added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Apr 14, 2019
@tsteur tsteur added this to the 3.10.0 milestone Apr 14, 2019
@diosmosis diosmosis merged commit 3edc587 into 3.x-dev May 20, 2019
@diosmosis diosmosis deleted the 9716 branch May 20, 2019 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
2 participants