Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 2 of 2
Getting an error: Fatal error: Class ‘Mage_[Namespace]_[Module]_Helper_Data’ not found in magento/app/Mage.php on line 520
 
Japhet Perez
Jr. Member
 
Total Posts:  3
Joined:  2010-07-19
 

Hi Parkey Parker.

Try with this. I found some bugs into your code.

This has been tested in MagentoCE and MagentoEE1.7.

Best.
Japhet Pérez Atristain
HiPXiK.com
IT

File Attachments
GoSquared-Magento-Module-done.zip  (File Size: 13KB - Downloads: 64)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Japhet Perez
Jr. Member
 
Total Posts:  3
Joined:  2010-07-19
 

Hi Parker, this is the diffs:

Adminhtml.xml:

--- /app/code/local/GoSquared-Magento-Module 2/GoSquared-Magento-Module/app/code/local/Gosquared/Livestats/etc/adminhtml.xml
+++ /app/code/local/Gosquared/Livestats/etc/adminhtml.xml
@@ -7,15 +7,22 @@
             </
all>
             <
admin>
                 <
children>
-                    <
configs>
+                    <
system>
                         <
children>
-                            <
example translate="title">
+                            <
config>
+                                <
children>
+                                    <
livestats translate="title" module="livestats">
+                                        <
title>GoSquared LiveStats</title>
+                                    </
livestats>
+                                </
children>
+                            </
config>
+                        </
children>
+                    </
system>
+                    <
livestats translate="title" module="livestats">
                                 <
title>LiveStats Settings</title>
                                 <
sort_order>100</sort_order>
-                            </
example>
+                    </
livestats>
                         </
children>
-                    </
configs>
-                </
children>
\ No newline at end of file
             
</admin>
         </
resources>
     </
acl>

System.xml:

--- /app/code/local/GoSquared-Magento-Module 2/GoSquared-Magento-Module/app/code/local/Gosquared/Livestats/etc/system.xml
+++ /app/code/local/Gosquared/Livestats/etc/system.xml
@@ -1,14 +1,14 @@
 
<?xml version="1.0"?>
 
<config>
     <
tabs>
-        <
gosquared translate="label" module="gosquared_livestats">
+        <
livestats translate="label" module="livestats">
             <
label>GoSquared</label>
             <
sort_order>350</sort_order>
-        </
gosquared>
+        </
livestats>
     </
tabs>
     <
sections>
-        <
livestats translate="label" module="gosquared_ivestats">
-            <
tab>gosquared</tab>
+        <
livestats translate="label" module="livestats">
+            <
tab>livestats</tab>
             <
label>LiveStats Settings</label>
             <
sort_order>100</sort_order>
             <
show_in_default>1</show_in_default>
@@ -
30,+30,@@
                             <
show_in_default>1</show_in_default>
                             <
show_in_website>1</show_in_website>
                             <
show_in_store>1</show_in_store>
-                            <
comment><![CDATA[Your account code from gosquared.com]]></comment>
+                            <
comment><![CDATA[Your account code from gosquared.com]]>
+                            </
comment>
                         </
acctcode>
                         <
userdisplay translate="label">
                             <
label>Display users as</label>
@@ -
40,+41,@@
                             <
show_in_default>1</show_in_default>
                             <
show_in_website>1</show_in_website>
                             <
show_in_store>1</show_in_store>
-                            <
comment><![CDATA[This sets whether or not the visitor ID's in Livestats are replaced by the logged in user's detailsChoose "Off" to use the deafult Livestats IDchoose "User ID" to use the user's ID from Magento and choose "Username" to use the user's username from Magento.]]></comment>
\ No newline at end of file
+                            <comment><![CDATA[This sets whether or not the visitor ID's in Livestats are replaced by the logged in user's detailsChoose "Off" to use the deafult Livestats IDchoose "User ID" to use the user's ID from Magento and choose "Username" to use the user's username from Magento.]]>
+                            </
comment>
\ No newline at end of file
                         
</userdisplay>
                     </
fields>
                 </
lsconfig>

I hope this change can be helpful.

Best.

 
Magento Community Magento Community
Magento Community
Magento Community
 
parkeyparker
Jr. Member
 
Total Posts:  12
Joined:  2011-03-08
 

Thanks so much for this, I will implement the changes you suggested on Sunday hopefully as I have uni work to be doing right now. I wasn’t too sure how to create the block, but will have a look around at using the template instead to accomplish what I need. If you know of any good tutorials or posts on getting some javascript to appear at the bottom of every page just before the </body> tag then that would be great!

Thanks so much again and I will update back here when I know if it works or not!

Aaron
wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
parkeyparker
Jr. Member
 
Total Posts:  12
Joined:  2011-03-08
 

Hi jpahipxik, I have literally only just seen your reply and will give that a look too and probably incorporate all of the suggestions and see what works…

Thanks again to everyone who has helped, this forum is seriously awesome, as are all of the guys on Twitter who helped me!!

Aaron
:D

 
Magento Community Magento Community
Magento Community
Magento Community
 
parkeyparker
Jr. Member
 
Total Posts:  12
Joined:  2011-03-08
 

Thanks so much for all of your help, I have now fixed all of the problems and got it all working. :D

All being the settings section, the actual main code doesn’t work and that brings me onto my next question:

uguptu - 31 March 2011 11:33 AM

Two more recommendations inspired by the checking out your code:

1. Building up your default helper, derive it from Mage_Core_Helper_Data rather than from Mage_Core_Helper_Abstract.
2. Creating a block, suggest NEVER to build HTML directly in the block’s _toHtml() method, use a template instead. Anyway, inheriting your block from Mage_Core_Block_Text doesn’t make you any good when you are hacking it’s _toHtml(), it just makes no sence. If you prefer to ignore my buzz and still render HTML directly, use Mage_Core_Block_Abstract as an ancestor. smile

What would be the best way to go about what I need to do. You say that inheriting from Mage_Core_Block_Text is bad… Would it be better for me to inherit from Page_Footer and add my HTML to a template file and add it to the footer that way as my code needs to go in the footer as it is tracking code...?

Thanks again for all of your help, it has been much appreciated!! :D

 
Magento Community Magento Community
Magento Community
Magento Community
 
uguptu
Sr. Member
 
Avatar
Total Posts:  125
Joined:  2010-02-01
Kyiv, Ukraine
 
parkeyparker - 11 April 2011 03:28 AM

Thanks so much for all of your help, I have now fixed all of the problems and got it all working. :D

All being the settings section, the actual main code doesn’t work and that brings me onto my next question:

uguptu - 31 March 2011 11:33 AM
Two more recommendations inspired by the checking out your code:

1. Building up your default helper, derive it from Mage_Core_Helper_Data rather than from Mage_Core_Helper_Abstract.
2. Creating a block, suggest NEVER to build HTML directly in the block’s _toHtml() method, use a template instead. Anyway, inheriting your block from Mage_Core_Block_Text doesn’t make you any good when you are hacking it’s _toHtml(), it just makes no sence. If you prefer to ignore my buzz and still render HTML directly, use Mage_Core_Block_Abstract as an ancestor. smile

What would be the best way to go about what I need to do. You say that inheriting from Mage_Core_Block_Text is bad… Would it be better for me to inherit from Page_Footer and add my HTML to a template file and add it to the footer that way as my code needs to go in the footer as it is tracking code...?

In case you are going to insert your block into the existing footer, it’s not right to inherit your own block from the same type as footer. Besides, there can only be one footer on the page, at least it only makes sense if there is only one.

What you need to do is to inherit from Mage_Core_Block_Template. In this case, your block will render itself according to the template which must be assigned to the block by either using <block type="..." name="..." template="mymodule/template.phtml" /> or putting

protected function _costruct()
{
    parent
::_construct();
    
$this->setTemplate('mymodule/template.phtml');
}

into the code of the block.

Template, in fact, is a PHTML file that is being included in block’s _toHtml() method. Thus, all methods of your block are available inside the template. It’s strongly restricted to use ONLY public methods and properties of the block inside the template, though.

Physically, the template will be located here: app/design/frontend/base/default/mymodule/template.phtml

 
Magento Community Magento Community
Magento Community
Magento Community
 
v_shall1987
Jr. Member
 
Total Posts:  17
Joined:  2012-04-05
 

I have created magento module using
http://t.wits.sg/tag/magento/
its working in local but when i checked on my live server error comes of class helper data not found i flushed cache,session every thing but nothing is working for me.Please help

Class ‘SavantDegrees_Twits_Helper_Data’ not found
can you please look this extension
http://t.wits.sg/tag/magento/

 
Magento Community Magento Community
Magento Community
Magento Community
 
jgryn
Jr. Member
 
Total Posts:  6
Joined:  2012-08-19
 

Hello,

I’ve got a very similar issue here, getting the error:
Fatal error: Class ‘Mage_Paygateus_Helper_Data’ not found in /home/site/public_html/app/Mage.php on line 546

Background:

I’ve been a developer for a while, but new to development for Magento.  For various reasons, my client needs to 2 copies of the authorize.net (Paygate) plugin, each one to be run under slightly different circumstances with different authorize.net accounts.

Basically, I’ve copied app/code/core/Mage/Paygate to app/code/local/CO4/Paygateus and changed all the class names from Mage_Paygate_* to CO4_Paygateus_*, and made similar changes to config.xml and system.xml; wherever the short form ‘paygate’ was used, I replaced with ‘paygateus’.

For reference, I tried adding:
<helpers>
<paygateus>
<class>CO4_Paygateus_Helper</class>
</paygateus>
</helpers>

into config.xml, with no change.

Any help would be greatly appreciated. 

I will attach my module to a separate post.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jgryn
Jr. Member
 
Total Posts:  6
Joined:  2012-08-19
 

I’m attaching my copy of the paygate module if anyone can be of any assistance.

File Attachments
Paygateus.zip  (File Size: 39KB - Downloads: 19)
 
Magento Community Magento Community
Magento Community
Magento Community
 
vikashdwi
Jr. Member
 
Total Posts:  3
Joined:  2012-02-24
 

If you have compilation enabled, trying disabling or re-compiling in System, Tools, Compilation.

If you can\\\’t get into the admin interface but have SSH access you can disable it there with:

php -f shell/compiler.php—disable
php -f shell/compiler.php—clear
php -f shell/compiler.php—state
Compiler Status:  Disabled
Compilation State:  Not Compiled
Collected Files Count:  0
Compiled Scopes Count:  0

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 2