Opened 2 years ago

Closed 2 years ago

#2844 closed Bug (fixed)

CustomVariables.getCustomVariablesValuesFromNameId fails

Reported by: Volox Owned by:
Priority: normal Milestone: 1.7 Piwik 1.7
Component: Core Keywords:
Cc: Sensitive: no

Description

When calling to CustomVariables.getCustomVariablesValuesFromNameId the call fails with a Fatal error that says:
Fatal error: Call to undefined method Piwik_DataTable_Array::deleteColumn() in C:\inetpub\wwwroot\piwik\plugins\CustomVariables\API.php on line 87

The URL I was using to call was:
index.php?module=API&method=CustomVariables.getCustomVariablesValuesFromNameId&idSite=2&idSubtable=83&token_auth=[authkey]&period=day&date=2011-12-01,2011-12-30&format=xml

In looking at the code it looks like the problem is that deleteColumn is trying to be used to removing the pricing column but the object is not a dataTable and instead is a filtered view of the table.

Change History (3)

comment:1 Changed 2 years ago by Volox

Workaround (kind of) is to include the &_leavePriceViewedColumn=true parameter so that the price column gets included and the problematic code gets skipped.

comment:2 Changed 2 years ago by vipsoft (robocoder)

  • Milestone set to 1.7 Piwik 1.7

comment:3 Changed 2 years ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

(In [5790]) Fixes #2844
Thanks for the report

Note: See TracTickets for help on using tickets.