• Resolved bluemuse

    (@bluemuse)


    I’ve got a totally clean install of wordpress and magento running and am trying to set the plugin up. I’m getting invalid url no matter what url i put in, i’ve tried

    http://mydomain.com/public_html/app/Mage.php
    /public_html/app/Mage.php
    /app/Mage.php

    I get Invalid URL message when putting these in. I know this is the location of the file as i’m looking at here on my server settings.

    Do I have to change the .htaccess file in the app folder? Are there any settings I should change somewhere else?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Richard Feraro

    (@richardferaro)

    You didn’t include your home/root directory

    Sample:

    if magento is installed in your webroot or public_html
    /home/richardferaroserver/public_html/app/Mage.php

    or

    if magento is one directory (magento) up
    /home/richardferaroserver/public_html/magento/app/Mage.php

    I have installed Mage Enabler on Wordpres 3.0.1. It works and it is enabled.
    I am trying to “connect” to Magento 1.4.1.1.
    I have fixed the function collision problem between WordPress and Magento.
    When, in wordpress plugin admin, I insert the absolute url for the file Mage.php, I get the following error.

    Fatal error: Uncaught exception 'Mage_Core_Model_Store_Exception' in D:\wamp\www\leborsedisilvia\shop\app\code\core\Mage\Core\Model\App.php:1247 Stack trace: #0 D:\wamp\www\leborsedisilvia\shop\app\code\core\Mage\Core\Model\App.php(760): Mage_Core_Model_App->throwStoreException() #1 D:\wamp\www\leborsedisilvia\shop\app\Mage.php(322): Mage_Core_Model_App->getStore(NULL) #2 D:\wamp\www\leborsedisilvia\shop\app\Mage.php(334): Mage::getStoreConfig('web/url/use_sto...', NULL) #3 D:\wamp\www\leborsedisilvia\shop\app\code\core\Mage\Core\Controller\Request\Http.php(204): Mage::getStoreConfigFlag('web/url/use_sto...') #4 D:\wamp\www\leborsedisilvia\shop\app\code\core\Mage\Core\Controller\Request\Http.php(156): Mage_Core_Controller_Request_Http->_canBeStoreCodeInUrl() #5 D:\wamp\www\leborsedisilvia\shop\app\code\core\Mage\Core\Model\App.php(379): Mage_Core_Controller_Request_Http->setPathInfo() #6 D:\wamp\www\leborsedisilvia\shop\app\code\core\Mage\Core\Model\App.php(262): Mage_Core_Model_App->_initRequest() #7 D:\wamp\www\leborsed in D:\wamp\www\leborsedisilvia\shop\app\code\core\Mage\Core\Model\App.php on line 1247

    Plugin Author Richard Feraro

    (@richardferaro)

    I’ve checked the file that triggers your error.
    D:\wamp\www\leborsedisilvia\shop\app\code\core\Mage\Core\Model\App.php

    It seems there’s a problem in your store code setup because it says you have an empty store code. The code below is where you’re having a problem (line #760):

    if (empty($this->_stores[$id])) {
    	$store = Mage::getModel('core/store');
    	/* @var $store Mage_Core_Model_Store */
    	if (is_numeric($id)) {
    		$store->load($id);
    	} elseif (is_string($id)) {
    		$store->load($id, 'code');
    	}
    
    	if (!$store->getCode()) {
    		$this->throwStoreException();
    	}
    	$this->_stores[$store->getStoreId()] = $store;
    	$this->_stores[$store->getCode()] = $store;
    }

    You have to fix it first. Mage Enabler requires a WORKING Magento setup.

    Hi,
    I appear to be getting roughly the same error as oscarino. I have a functioning webshop. I have modified the (__) function as instructed. When I enter the absolute url of Mage.php the settings page for Mage Enabler is just blank, no errors or anything. The front end of my blog is completely blank. The following showed up in my error log:

    [Wed Sep 01 09:42:15 2010] [error] [client xx.xx.xxx.xxx] PHP Fatal error:  Uncaught exception 'Mage_Core_Model_Store_Exception' in /var/www/magento/htdocs/app/code/core/Mage/Core/Model/App.php:1228
    Stack trace:
    #0 /var/www/magento/htdocs/app/code/core/Mage/Core/Model/App.php(760): Mage_Core_Model_App->throwStoreException()
    #1 /var/www/magento/htdocs/app/Mage.php(322): Mage_Core_Model_App->getStore(NULL)
    #2 /var/www/magento/htdocs/app/Mage.php(334): Mage::getStoreConfig('web/url/use_sto...', NULL)
    #3 /var/www/magento/htdocs/app/code/core/Mage/Core/Controller/Request/Http.php(196): Mage::getStoreConfigFlag('web/url/use_sto...')
    #4 /var/www/magento/htdocs/app/code/core/Mage/Core/Controller/Request/Http.php(148): Mage_Core_Controller_Request_Http->_canBeStoreCodeInUrl()
    #5 /var/www/magento/htdocs/app/code/core/Mage/Core/Model/App.php(379): Mage_Core_Controller_Request_Http->setPathInfo()
    #6 /var/www/magento/htdocs/app/code/core/M in /var/www/magento/htdocs/app/code/core/Mage/Core/Model/App.php on line 1228

    It may be worth pointing out that I don’t have a ‘default’ website/store setup – I have two websites, and two stores for each website (to handle different languages). Although I don’t see how this can be a problem. Should I be specifying a store to use somewhere?

    Ok. I found out why I am getting the error. I posted the solution on your blog, but basically if you don’t have a store with the code ‘default’ the plugin will crash and burn. So for now one can just edit the plugin file manually, and change:
    Mage::app( 'default' );
    to:
    Mage::app( 'your_store_code_here' );

    Plugin Author Richard Feraro

    (@richardferaro)

    I’m just wondering, is it a good practice to remove the ‘default’ store view code and change it to whatever code you want when in fact you do really need a default config on settings that relies to a global/default reference?

    PS: I’ve never seen a plugin that “…burn” like c_turnbull mentioned

    I must admit I can’t find out how Magento goes about getting the default store view when there isn’t one specifically named ‘default’. Perhaps it’s just the first one in the list of store views that gets loaded (i.e. sort order 1), for all I know. But it works, so I’m happy enough!

    Plugin Author Richard Feraro

    (@richardferaro)

    @c_turnbull: This has been fixed in Mage Enabler 1.2 version

    i install magento in c:\wamp\www\magento
    so which URL i have to write in mage enabled plugin.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Mage Enabler] Mage.php address’ is closed to new replies.