Quantcast
Channel: Support & Bugs - Matomo forums
Viewing all articles
Browse latest Browse all 5706

Action not defined error in custom controller

$
0
0

@Naser_Aslam wrote:

Hi?
I wanted to create a custom plugin for custom reports sharing. I have created a new page for it as mentioned at How to add new pages and menu items to Piwik – Introducing the Piwik Platform - Analytics Platform - Matomo

Now, I am getting action not defined error when I try to upload custom file to controller. I checked from URL and found that http://localhost/matomo/index.php?module=CustomReportSharing&action=index is accessible but http://localhost/matomo/index.php?module=CustomReportSharing&action=index1 not accessible. Although both function have been defined in controller i.e., CustomReportSharing

Please guide me why no action is accessible other than index.
Here is code snippet.

namespace Piwik\Plugins\CustomReportSharing;
class CustomReportSharing extends \Piwik\Plugin
{
    public function index()
    {
        return $this->renderTemplate('index', array( 'answerToLife' => 42));
    }
    public function index1()
    {
            return $this->renderTemplate('index', array('answerToLife' => 46 ));
    }
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5706

Trending Articles