0

I have try to install stamped.io extension, after install back-end showing following error if i click stamped.io setting.

Fatal error: Uncaught Error: Class 'Stamped_Core_Block_Adminhtml_System_Config_Form_Button' not found in /home/abc/public_html/app/code/core/Mage/Core/Model/Layout.php:590 Stack trace: #0 /home/abc/public_html/app/Mage.php(533): Mage_Core_Model_Layout->getBlockSingleton('\n ...') #1 /home/abc/public_html/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(310): Mage::getBlockSingleton('\n ...') #2 /home/abc/public_html/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(229): Mage_Adminhtml_Block_System_Config_Form->initFields(Object(Varien_Data_Form_Element_Fieldset), Object(Mage_Core_Model_Config_Element), Object(Mage_Core_Model_Config_Element)) #3 /home/abc/public_html/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(164): Mage_Adminhtml_Block_System_Config_Form->_initGroup(Object(Varien_Data_Form), Object(Mage_Core_Model_Config_Element), Object(Mage_Core_Model_Config_Element)) #4 /home/abc/public_html/app/code/core/Mage/Adminhtml/Block/System/Confi in /home/abc/public_html/app/code/core/Mage/Core/Model/Layout.php on line 590

app/code/community/Stamped/Core/Block/AdminHtml/System/Config/Form/Button.php

<?php
class Stamped_Core_Block_Adminhtml_System_Config_Form_Button extends Mage_Adminhtml_Block_System_Config_Form_Field
{
    /*
     * template
     */
    protected function _construct()
    {
        parent::_construct();
        $this->setTemplate('stamped/system/config/button.phtml');
    }

    /**
     * return html
     *
     * @param  Varien_Data_Form_Element_Abstract $element
     * @return string
     */
    protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
    {
        return $this->_toHtml();
    }
}

How to solve the class missing error?

  • can you please update your code where you have use the Form/Button.php – Rakesh Varma Nov 1 '19 at 7:06
  • @RakeshVarma Pls check with my updated post. – zus Nov 1 '19 at 7:20
1

At first sight, I could identify that:

app/code/community/Stamped/Core/Block/AdminHtml/System/Config/Form/Button.php

path should be:

app/code/community/Stamped/Core/Block/Adminhtml/System/Config/Form/Button.php

Notice the typo in AdminHtml, which should be Adminhtml.

Please fix this and let me know if you find any other problem further.

  • Great, how to find this kind of error? Recommend any editor or something else? – zus Nov 1 '19 at 7:52
  • There is no magical editor trick. Just follow the core principles of Magento for naming conventions. – Mohit Kumar Arora Nov 1 '19 at 8:01
  • I have magento in localhost, here app/code/community/Stamped/Core/Block/AdminHtml/System/Config/Form/Button.php working, may i know the difference? – zus Nov 1 '19 at 9:00
  • 1
    Maybe you are using the Windows system for the localhost. There is a major difference between a Windows and a Linux system. The folder names AdminHtml, adminhtml, and Adminhtml are same for Windows, but these are threee different folders for Linux. – Mohit Kumar Arora Nov 1 '19 at 9:28
  • Yes, I am using Windows for testing and development. Thank you for your explanation. – zus Nov 1 '19 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.