Rectangle 27 137

I looked into the Magento system log file (var/log/system.log). There I saw the exact error.

The error is as below:-

Recoverable Error: Argument 1 passed to Mage_Core_Model_Store_Group::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in YOUR_PATH\app\code\core\Mage\Core\Model\App.php on line 575 and defined in YOUR_PATH\app\code\core\Mage\Core\Model\Store\Group.php on line 227

Actually, I had this error before. But, error display message like Error: 404 Not Found was new to me.

The reason for this error is that store_id and website_id for admin should be set to 0 (zero). But, when you import database to new server, somehow these values are not set to 0.

Open PhpMyAdmin and run the following query in your database:-

SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;

I have written about this problem and solution over here:-

It was transferring Magento from one local machine server to another.. I also hadn't got such error in other instances but in this case I got such error..

When you use Magento's backup tool it will add this line to the sql output: /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; This might be missing when you use any other method exporting the database causing mysql to start importing at 1 when it really should use 0 as ID.

php - "Error 404 Not Found" in Magento Admin Login Page - Stack Overfl...

php magento
Rectangle 27 12

I noticed this problem appearing in my JavaScript Console log. It was a simple case of a CSS file looking for a background image that didn't exist and the server sending a 404 error message in its place.

php - Resource interpreted as image but transferred with MIME type tex...

php magento
Rectangle 27 12

I noticed this problem appearing in my JavaScript Console log. It was a simple case of a CSS file looking for a background image that didn't exist and the server sending a 404 error message in its place.

php - Resource interpreted as image but transferred with MIME type tex...

php magento
Rectangle 27 3

There is an issue with the curl extension from wamp2.2 on win7. You can download the "fixed" curl dll from here: http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/ Look at the section "Fixed curl extensions:" and get one for php 5.4. Replace the curl dll with that one and restart your server.

@aligarian. To be honest I never tried it for php 5.4. I had the same issue with php 5.3 and this solved my problem.

Getting error "PHP extension "curl" must be loaded" in installation of...

php magento curl dll wamp
Rectangle 27 2

first of all add version in your Testplugin_Module.xml so magneto can identify which version it is and if you ever want to update so you can.

app\etc\modules
app\code\local\Testplugin\Module\Block
<?php   
class Testplugin_Module_Block_Index extends Mage_Core_Block_Template{   





}
code\local\Testplugin\Module\controllers
<?php
class Testplugin_Module_IndexController extends Mage_Core_Controller_Front_Action{
    public function IndexAction() {

      $this->loadLayout();   
      $this->getLayout()->getBlock("head")->setTitle($this->__("module"));
            $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
      $breadcrumbs->addCrumb("home", array(
                "label" => $this->__("Home Page"),
                "title" => $this->__("Home Page"),
                "link"  => Mage::getBaseUrl()
           ));

      $breadcrumbs->addCrumb("module", array(
                "label" => $this->__("module"),
                "title" => $this->__("module")
           ));

      $this->renderLayout(); 

    }
}
<?xml version="1.0"?>
<config>
  <modules>
    <Testplugin_Module>
      <version>0.1.0</version>
    </Testplugin_Module>
  </modules>
  <frontend>
    <routers>
      <module>
        <use>standard</use>
          <args>
            <module>Testplugin_Module</module>
            <frontName>module</frontName>
          </args>
      </module>
    </routers>
        <layout>
          <updates>
            <module>
              <file>module.xml</file>
            </module>
          </updates>
        </layout>
  </frontend>
  <global>
    <blocks>
      <module>
        <class>Testplugin_Module_Block</class>
      </module>
    </blocks>
  </global>
</config>
app\design\frontend\base\default\layout
<?xml version="1.0"?>   
<layout version="0.1.0">   
  <module_index_index>   
    <reference name="root">   
      <action method="setTemplate"><template>page/1column.phtml</template></action>   
    </reference>   
    <reference name="content">   
      <block type="module/index" name="module_index" template="module/index.phtml"/>   
    </reference>   
  </module_index_index>   
</layout>
app\design\frontend\base\default\template\module
Hi, I am there!!
die('here')
public function indexAction()
here
http://127.0.0.1/magento1.9.2/index.php/module

@user1735921 : check the updated working answer..

php - Magento: Error 404 in plugin - Stack Overflow

php magento
Rectangle 27 7

is_filterable
filterable

If you wish to use an update script to change the previously-established setting, the syntax would be as follows:

$setup->updateAttribute('catalog_product', 'mm_framestyle', 'is_filterable', 2);

php - Magento adding attribute with option filterable (no results) thr...

php magento attributes module
Rectangle 27 41

The reference to "text/html" might suggest you have an error being returned by the server.

yeah in my case it was S instead of a small s :P

php - Resource interpreted as image but transferred with MIME type tex...

php magento
Rectangle 27 41

The reference to "text/html" might suggest you have an error being returned by the server.

yeah in my case it was S instead of a small s :P

Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).

php - Resource interpreted as image but transferred with MIME type tex...

php magento
Rectangle 27 5

{"error":"File was not uploaded.","errorcode":666}
Varien_File_Uploader::__construct()
lib/Varien/File/Uploader.php

Here are the important parts

<?php

class Varien_File_Uploader
{
    /**
     * Uploaded file handle (copy of $_FILES[] element)
     *
     * @var array
     * @access protected
     */
    protected $_file;

    const TMP_NAME_EMPTY = 666;

    function __construct($fileId)
    {
        $this->_setUploadFileId($fileId);
        if(!file_exists($this->_file['tmp_name'])) {
            $code = empty($this->_file['tmp_name']) ? self::TMP_NAME_EMPTY : 0;
            throw new Exception('File was not uploaded.', $code);
        } else {
            $this->_fileExists = true;
        }
    }
}

Looking back up the trace you see this is called

$uploader = new Mage_Core_Model_File_Uploader('image');

Which is extended from the Varien class, so the Varien_File_Uploader::_setUploadFileId($fileId) will construct the $this->_file array based on the key image, in this case.

$_FILES['image']['tmp_name']

I checked the 'error' field by temporarily changing the exception to

throw new Exception('File was not uploaded. ' . $this->_file['error'], $code);

I got 7, which is Failed to write file to disk. which means it's a permissions issue. Do a phpinfo() to check where your upload_tmp_dir is set to and make sure it's writable.

In my case, I was out of file space in the /tmp dir.

Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).

php - Magento "File was not uploaded" - Stack Overflow

php image file-upload magento
Rectangle 27 142

You need to install the DOM extension. You can do so on Debian / Ubuntu using:

sudo apt-get install php5-dom
yum install php-xml

If you get conflicts between PHP 5 and PHP 5.3 packages, you could try to see if the php53-xml package exists instead.

what about centos..

i tried it, there is message in putty.. ... Error: php53-common conflicts with php-common ...

installing php-xml solved this for me but don't forget the 'service httpd restart'

sudo apt-get install php7.1-xml

php - Class 'DOMDocument' not found - Stack Overflow

php xml magento
Rectangle 27 1

I had the same problem , Double check your /path/to/magento/app/etc/modules/Module_Name.xml , I had the codePool set to "community" and placed my extension in "local" directory this caused the 404 issue, when I changed the codePool value to "local" everything worked

php - Magento helloworld tutorial - Stack Overflow

php magento
Rectangle 27 11

To give an example to what Alex said, if you're using Magento, for example, .phtml files are only to be found in the /design area as template files, and contain both HTML and PHP lines. Meanwhile the PHP files are pure code and don't have any lines of HTML in them.

What is phtml, and when should I use a .phtml extension rather than .p...

file-extension php
Rectangle 27 8

Uncomment the following line: extension=php_curl.dll in the php.ini configuration file of your XAMP.

The location of the php.ini file will be mostly

%XAMPP_HOME%/php/php.ini

I did. But not fixed. php version is 7.0.6, wamp version is 2.4

PHP extension "curl" must be loaded while installing on xampp Windows ...

php windows magento curl xampp
Rectangle 27 9

;extension=php_soap.dll
extension=php_soap.dll

After this add do the below steps 1. Install php-soap # sudo apt-get install php-soap # restart the server

magento . PHP extension "soap" must be loaded - Stack Overflow

magento-1.7
Rectangle 27 2

Your class name is wrong and also model files path .

Mage::getModel("contactform/contact");
Chandan>Contactform>Model>Contact.php
Chandan>Contactform>Model>Resource>Contact.php
Chandan>Contactform>Model>Resource>Contact>Collection.php

Also issue in is not closed.

<class>Chandan_Contactform_Model_Resource/class>
<class>Chandan_Contactform_Model_Resource</class>

Dear Amit, I have maintaned the above file structure

Amit, that was a typo. In config.xml, everything is okay.

php - Magento Error : Can't retrieve entity config: - Stack Overflow

php magento
Rectangle 27 2

I faced this error twice and in both cases there was a problem inside my xml files.

My problems were not closing a tag (example):

<frontend>
    <routers>
        <!-- ... -->
    <routers>

And specifying the module attribute in the wrong way (in etc/adminhtml.xml):

<config>
    <menu>
        <report>
            <children>
                <foo_bar translate="title" module="bar"> <!-- module has to be lower case here and without the package name. Foo_Bar or Bar are wrong and cause the error. -->
                    <title>My own report</title>
                    <action>adminhtml/bar</action>
                </foo_bar>
            </children>
        </report>
    </menu>
</config>

Note the comment in the code above.

Unfortunately there's no easy way to check xml files for typos and mistakes, but one way would be comment out the codes part by part and see if the error goes away.

Magento : Fatal error: Class 'Mage_Giftcards_Helper_Data' not found in...

php magento
Rectangle 27 1

You will definitely need XML and PHP, because this is mainly what Magento is built on.

Additionally to the official documents, there are a lot of helpful and very diverse tutorials out there that explain the mechanics of Magento. A web search helps, and I can recommend everything by Alan Storm, for example this litte module: http://alanstorm.com/magento_list_module

As soon as creating an extension works for you, you will also find a lot of tutorials on how to alter the product-view, or you can then post a more specific question here or on magento.stackexchange.com.

Creating Magento Extension - Where to start? - Stack Overflow

magento
Rectangle 27 1

Please check if compilation is enabled from admin > system > Tools > compilation. If you have added extension without disabling the compilation it may cause this problem. Clear cache & rerun the compilation process again. Hope this may solve your problem.

Magento : Fatal error: Class 'Mage_Giftcards_Helper_Data' not found in...

php magento
Rectangle 27 18

The reason your module needs a helper class is the module argument in the system.xml file:

<cashondelivery translate="label" module="cashondelivery">

Magento passes the module argument to the Mage::helper() factory method. This in turn completes the class id to cashondelivery/data.

Mage::helper('cashondelivery');
// identical to Mage::helper('cashondelivery/data');

Now Magento checks for the class prefix to use by looking for the node global/helpers/cashondelivery/class which is missing.

Rather straightforward so far, but here is where it might be a little confusing for some. If Magento doesn't find a helper class prefix, it tries to makes one up by prefixing the class id with mage_ and appending _helper. So this gives you mage_cashondelivery_helper as the class prefix, and mage_cashondelivery_helper_data as the full class name.

The autoloader turns this into Mage/Cashondelivery/Helper/Data.php, which can't be found, and hence the exception you are experiencing.

Besides creating the Companyname_Cashondelivery_Helper_Data class, you need to add the class group mapping to your config.xml file as follows:

<global>
  <helpers>
    <cashondelivery>
      <class>Companyname_Cashondelivery_Helper</class>
    </cashondelivery>
  </helpers>
</global>

Thanks vinai. That problem solved. I have added the xml code in config.xml. But I am wondering why Am I this error for the same above code. Fatal error: Call to a member function toOptionArray() on a non-object in D:\xampp\htdocs\magento\app\code\core\Mage\Adminhtml\Block\System\Config\Form.php on line 421

Thanks a lottttttttttt, dude. I was going crazy about this. Your post has been very helpful.

This is a really clear explanation of what Magento is trying to do here - helped me a lot with my Namespace_MixedCaseModuleName and getting a helpers reference.

zend framework - Magento module Fatal error: Class 'Mage_Cashondeliver...

php zend-framework magento
Rectangle 27 11

If your server does not have curl installed on it you can type one of the following commands to install it:

For Debian/Ubuntu based systems you can type below command

sudo apt-get install php5-curl
sudo /etc/init.d/apache2 restart

For RedHat/CentOS based systems you can type (as root)

yum install php5-curl
/etc/init.d/httpd restart

This should install curl and have it start to work for you.

If you tell me what flavor of Linux you are using I can probably help you out a little more as to what commands you have to do in order to do the install.

magento - PHP extension "curl" must be loaded. PHP extension "soap" mu...

php magento