in joomla

I installed joomla 2.5 because i need this h5p things. i did the order in the intallation guide page. But when i view the article it gets an error as

Undefined property: stdClass::$itemid in C:\xampp\htdocs\coco\plugins\content\h5p\h5p.php on line 59.

i am testing  in xammp . And where should i put  h5p flashcards and drag and drop examples?  i'm new to h5p and can you help me for this to be solved?


            $html = '<div class="h5p-iframe-wrapper" id="iframe-wrapper-##h5pId##">';
            $html .= '<iframe id="iframe-##h5pId##" class="h5p-iframe" src="##iframeSrc##" style="width: 100%; height: 400px; border: none;"></iframe>';
            $html .= '</div>';

            $article_url = JRoute::_(ContentHelperRoute::getArticleRoute($article->id, $article->catid, $article->itemid)) ."-$article->alias";
            foreach ($matches as $key => $match) {
                $h5pId = $match[1];
                $h5pDomId = str_replace('.', '_', $h5pId); // Periods make jQuery unhappy.

                if ($context === 'com_content.article') {
                    $iframeSrc = 'index.php?option=com_h5p&view=h5p&layout=view&tmpl=component&cid=' . $h5pId;
                    $replacement = str_replace(array('##h5pId##', '##iframeSrc##'), array($h5pDomId, $iframeSrc), $html);

                    $article->text = preg_replace(
                        '/\<img.*?h5p-placeholder-image.*?data-content-id\=\"' . $h5pId . '\".*?\>/',
                        $replacement,
                        $article->text,
                        1);
                    $this->registerStartTime($h5pId);
                }
                elseif (isset($article->id)) {
                    $article->text = preg_replace('/\<img.*?h5p-placeholder-image.*?data-content-id\=\"' . $h5pId . '\".*?\>/', '<a href="' . $article_url . '">$0</a>', $article->text, 1);
                }
                else {
                    $article->text = preg_replace('/\<img.*?h5p-placeholder-image.*?data-content-id\=\"' . $h5pId . '\".*?\>/', '', $article->text, 1);
                }
            }
        }