Getting Fatal error on executing a test on Behat+Mink+Selenium - php

I am executing the test on Behat+Mink+Selenium. Below is the code which is have added in the FeatureContext.php:
/**
* #Given /^\|I am on "([^"]*)"$/
*/
public function iAmOn($arg1)
{
$this->visit($arg1);
}
Below is the error which i am getting:
Feature: Drupal.org search
In order to find modules on Drupal.org
As a Drupal user
I need to be able to use Drupal.org search
#javascript
Scenario: Searching for "behat" # features\test1.feature:7
PHP Fatal error: Call to a member function getSession() on null in C:\Behat Demo1\vendor\behat\mink-extension\src\Behat\MinkExtension\Context\RawMink
Context.php on line 103
Fatal error: Call to a member function getSession() on null in C:\Behat Demo1\vendor\behat\mink-extension\src\Behat\MinkExtension\Context\RawMinkConte
xt.php on line 103
Please help.

Related

PHP Fatal Error in Magento ver. 1.9.2.1

I keep having this problem flood by error_log:
PHP Fatal error: Call to a member function getRequestedRouteName() on a non-object in /home/bullion/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php on line 226
Here is the code snippet from lines 224-229
public function getFullActionName($delimiter='_')
{
return $this->getRequest()->getRequestedRouteName().$delimiter.
$this->getRequest()->getRequestedControllerName().$delimiter.
$this->getRequest()->getRequestedActionName();
}
Thank you in advance for your help!

Symfony2 : Fatal Error: Call to a member function loadTemplate() on a non-object

I try to upgrade my symfony2 project to symfony3 (I have moved from twig 1.2 to twig 2.0, and upgrade some other bundles like fos_user bundle, braincrafted/bootstrap bundle... ) and I encounter an error :
Fatal Error: Call to a member function loadTemplate() on a non-object
The detailed log is :
DEBUG - Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelController".
CRITICAL - Fatal Error: Call to a member function loadTemplate() on a non-object
CRITICAL - Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: "Error: Call to a member function loadTemplate() on a non-object" at /my/path/Symfony/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Form/TwigRendererEngine.php line 156
The error triggers for the first template containing Form blocks. If I remove the form blocks (e.g {{form_start}} or {{form_widget(...)}}), the errors appears for another template with form elements.
Does anyone have an idea to help me ?
Thanks in advance.
I have disabled BraincraftedBootstrapBundle.
I have added a print_r in TwigRendererEngine.php
protected function loadResourcesFromTheme($cacheKey, &$theme)
{
print_r($theme); // added for debug
if (!$theme instanceof \Twig_Template) {
/* #var \Twig_Template $theme */
$theme = $this->environment->loadTemplate($theme);
}
...
to get the name of the template which trigger the error.
It seems to be "form_div_layout.html.twig"
When BraincraftedBootstrapBundle is activate, the template name is BraincraftedBootstrapBundle:Form:bootstrap.html.twig (which use form_div_layout.html.twig)
Does this could help you ? Thanks
I found a fix for the while
I have changes my composer from "sensio/distribution-bundle": "5.0", to "sensio/distribution-bundle": "~4.0", it seems that there was some big change in the code...
I am still not in version 3.0 but now it works again.

Magento Sitemap Causing Error

All the sudden in the admin side when I go to submit sitemap it shows up a white screen. Here's what my error logs show.
PHP Fatal error: Call to a member function getId() on a non-object in /home/investor/public_html/yourvaporizers.com/app/code/core/Mage/Adminhtml/controllers/SitemapController.php on line 99
PHP Fatal error: Call to a member function getCollection() on a non-object in /home/investor/public_html/yourvaporizers.com/includes/src/Mage_Adminhtml_Block_Sitemap_Grid.php on line 47
Not a coder so have no clue how to fix this.
UPDATE - I should of added the whole error code.
Stack trace:
0 /home/investor/public_html/yourvaporizers.com/includes/src/__default.php(63823): PDOStatement->execute(Array)
1 /home/investor/public_html/yourvaporizers.com/includes/src/Varien_Db_Statement_Pdo_Mysql.php (110): Zend_Db_Statement_Pdo->_execute(Array)
2 /home/investor/public_html/yourvaporizers.com/includes/src/__default.php(63411): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
3 /home/investor/public_html/yourvaporizers.com/includes/src/__default.php(52806): Zend_Db_Statement->execute(Array)
4 /home/investor/public_html/yourvaporizers.com/includes/src/__default.php(53842): Zend_Db_Adapter_Abstract->query('SELECT `mg_core...', Array)
5 /home/investor/public_html/yourvaporizers.com/includes/src/__default.php(54687): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `mg_core...', Array)
6 /home/investor/p in /home/investor/public_html/yourvaporizers.com/includes/src/__default.php on line 63829
[07-Apr-2014 07:51:25 UTC] PHP Fatal error: Call to a member function getCollection() on a non-object in /home/investor/public_html/yourvaporizers.com/includes/src/Mage_Adminhtml_Block_Sitemap_Grid.php on line 47
[07-Apr-2014 07:51:28 UTC] PHP Fatal error: Call to a member function getId() on a non-object in /home/investor/public_html/yourvaporizers.com/app/code/core/Mage/Adminhtml/controllers/SitemapController.php on line 99
[07-Apr-2014 07:51:32 UTC] PHP Fatal error: Call to a member function getCollection() on a non-object in /home/investor/public_html/yourvaporizers.com/includes/src/Mage_Adminhtml_Block_Sitemap_Grid.php on line 47
[07-Apr-2014 08:07:18 UTC] PHP Fatal error: Call to a member function getCollection() on a non-object in /home/investor/public_html/yourvaporizers.com/includes/src/Mage_Adminhtml_Block_Sitemap_Grid.php on line 47
[07-Apr-2014 10:03:37 UTC] PHP Fatal error: Class 'Mage_Sitemap_Model_Sitemap' not found in /home/investor/public_html/yourvaporizers.com/app/code/community/Creare/CreareSeoCore/Model/Sitemap/Sitemap.php on line 4
Here's line 99 of that file
#File: app/code/core/Mage/Adminhtml/controllers/SitemapController.php
$this->_title($model->getId() ? $model->getSitemapFilename() : $this->__('New Sitemap'));
So, it looks like Magento is trying to call getId on the $model variable, but $model is not an object. If we look to where $model was assigned/defined, in a stock system, we see
#File: app/code/core/Mage/Adminhtml/controllers/SitemapController.php
$model = Mage::getModel('sitemap/sitemap');
So, there's two possible reasons for your error. First, you, or someone else, installed an extension into your Magento system and it did something (class rewrite, behavior change) that caused a recoverable error when attempting to instantiate the sitemap/sitemap model. This results in $model being false, and leads to your error.
The second is someone has change this file or the site map model file (either in core or one of the code pools community, local) and did something that leads to $model being undefined.
Debugging steps would include diffing against a freshly downloaded copy, and disabling any extensions related to the site map functionality (or installed recently). As for
Not a coder so have no clue how to fix this.
the better question might be
Why is a non-coder working with a system that, for years, has proven you need to be a coder (or willing to learn) to work with.

"Invalid config field backend model: adminhtml/system_config_backend_secure" Error

I have apparently done a sloppy upgrade to Magento 1.4.2.
At first, I was getting this error:
Fatal error: Call to a member function toOptionArray() on a non-object in /home/rrmusicc/public_html/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php on line 385.
I found a solution for this in a forum so I applied that fix, now I'm getting this error:
Invalid config field backend model: adminhtml/system_config_backend_secure
Any ideas?

Fatal error: Call to undefined method Zend_XmlRpc_Value::getGenerator() magento

I was upgrading magento when something went wrong and now when I try to login to admin, I am unable to log in to back end admin of magento and I get the following error
Fatal error: Call to undefined method Zend_XmlRpc_Value::getGenerator() in /home/boutique/public_html/app/code/core/Zend/XmlRpc/Request.php on line 413
and the code on respective lines is
/**
* Create XML request
*
* #return string
*/
public function saveXml()
{
$args = $this->_getXmlRpcParams();
$method = $this->getMethod();
$generator = Zend_XmlRpc_Value::getGenerator();
$generator->openElement('methodCall')
->openElement('methodName', $method)
->closeElement('methodName');
I cant understand why this issue is happening, I tried replacing request.php and response.php files from fresh download of magento..
can body help me? why this eror is popping?
There's something about your installation of PHP and Magento that's broken — for some reason the Zend_XmlRpc_Value object that's instantiated doesn't contain a getGenerator method. The class for this object is normally defined in
lib/Zend/XmlRpc/Value.php
However, it's possible there may be a class override in place at
app/code/core/Zend/XmlRpc/Value.php
app/code/community/Zend/XmlRpc/Value.php
app/code/local/Zend/XmlRpc/Value.php
It's also possible your system may have another version of the zend framework installed somewhere in the PHP include path.

Categories