Customer authenticates only when the account is created in magento - magento

When the user types his email and password at login page or checkout page he is redirected to login page always without any error message in screen and log files (php log and magento log). The dashboard is only acessible when the user creates a new account.
Magento 1.8.1 (migrated from 1.8.0)
Ultimo theme

Please try this.
Step 1: Web_Customer.xml - Enabling custom module:
<?xml version=”1.0″?>
<config>
<modules>
<Web_Customer>
<active>true</active>
<codePool>local</codePool>
</Web_Customer>
</modules>
</config>
Step 2: config.xml – Configuration for our module:
<?xml version=”1.0″?>
<config>
<modules>
<Web_Customer>
<version>0.0.1</version>
</Web_Customer>
</modules>
<frontend>
<routers>
<customer><!– Name of core module to be overridden–>
<args>
<modules>
<Web_Customer before=”Mage_Customer”>Web_Customer</Web_Customer><!– Tell Magento to call our custom module before the Mage/Checkout module –>
</modules>
</args>
</customer>
</routers>
</frontend>
</config>
Step 3: Add the following code to line 139 just after the opening of loginPostAction() in AccountController.php
<?php
require_once(“Mage/Customer/controllers/AccountController.php”);
class Web_Customer_AccountController extends Mage_CUstomer_AccountController{
public function loginPostAction()
{
// generate form_key if missing or invalid
if (!($formKey = $this->getRequest()->getParam(‘form_key’, null)) || $formKey != Mage::getSingleton(‘core/session’)->getFormKey()) {
$this->getRequest()->setParams(array(‘form_key’ =>Mage::getSingleton(‘core/session’)->getFormKey()));
}
//Note*
// rest code is same as from Mage/Customer/controllers/AccountController.php
}
}
?>

Delete the folder var/cache and var/session.
If the domain name has changed make sure that you also change the cookie domain in the database.

Related

404 page in magento for custom module

I am new to magneto. I have created a custom module for webservice. I have done forgotpassword functionality but i am getting 404 page.
My folder structure for controller file:
app/code/local/Blazedream/Oauth/controllers/Customer/AccountController
class Blazedream_Oauth_Customer_AccountController extends Mage_Customer_AccountController
{
public function forgotPasswordPostAction()
{
echo"hiiiii";exit;
}
}
My config file:
<?xml version="1.0"?>
<config>
<modules>
<Blazedream_Oauth>
<version>0.1.0</version>
</Blazedream_Oauth>
</modules>
<frontend>
<routers>
<oauth>
<use>standard</use>
<args>
<modules>
<Blazedream_Oauth before="Mage_Oauth">Blazedream_Oauth</Blazedream_Oauth>
</modules>
</args>
</oauth>
</routers>
</frontend>
</config>
My module is enabled.
My url to run the forgotPasswordPostAction
http://xxxxxxxxxx/xxxxxx/index.php/oauth/customer/account/forgotpasswordpost
I am getting 404 page, i dont know where i had done the mistake.
If i create a accountcontroller file without creating the customer folder inside controllers folder, Then it is executing and print "hiiiiiiiii"
but If i create folder, yhen it displays 404 page..
Can anyone help me to fix this issue?
If you want to use the "Customer" folder that please use below:
Blazedream_Oauth_Customer
<modules>
<Blazedream_Oauth before="Mage_Oauth">Blazedream_Oauth_Customer</Blazedream_Oauth>
</modules>
class Blazedream_Oauth_Customer_AccountController extends Mage_Customer_AccountController
{
// your code
}
I found the issue.
I used wrong url to run, the correct url is
http://xxxxxx/xxxxxxxx/index.php/oauth/customer_account/forgotpasswordpost
Thanks for everyone replies.

Magento 1 - module controller not working

Tyring to create a module where i can create a product dynamically using catalog->products model, and redirect control to the product's review page. Need only single controller with single action. No blocks, helpers, templates.... nothing required.
But it seems like controller action is not properly routed, there is some mistake in code or configuration ... getting 404 not found error
Trying this url:
http://localhost/magento_test/dynamicproduct/index/index
Namespace: Waqasalieee
Module name: Dynamicproduct
Magento version: 1.7.0.2
Here are the file contents:
local/Waqasalieee/Dynamicproduct/controllers/IndexController.php
<?php
class Waqasalieee_Dynamicproduct_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction() {
die('working in index');
}
}
?>
local/Waqasalieee/Dynamicproduct/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Waqasalieee_Dynamicproduct>
<version>1.0</version>
</Waqasalieee_Dynamicproduct>
</modules>
<frontend>
<routers>
<dynamicproduct>
<use>standard</use>
<args>
<module>Waqasalieee_Dynamicproduct</module>
<frontName>dynamicproduct</frontName>
</args>
</dynamicproduct>
</routers>
</frontend>
</config>
app/etc/modules/Waqasalieee_Dynamicproduct.xml
<?xml version='1.0'?>
<config>
<modules>
<Waqasalieee_Dynamicproduct>
<codepool>local</codepool>
<active>true</active>
</Waqasalieee_Dynamicproduct>
</modules>
</config>
It should show some error or 'working in index' (string) but its giving 404 not found error.
I was having the same sympton and landed here. For me the error was not a erroneous XML config but that the Store Code was actually added to the URL (that's a magento feature, not a bug) and so my controller was only accessible by adding a valid store code to the URL like http://mystore/<storecode>/<controller>/<action>.
In my case http://mage.localhost/en/customer/check
In your config.xml use codePool instead of codepool.
<?xml version='1.0'?>
<config>
<modules>
<Waqasalieee_Dynamicproduct>
<codePool>local</codePool>
<active>true</active>
</Waqasalieee_Dynamicproduct>
</modules>
</config>

Magento costum module shows 404

I tried the tutorial on http://www.satollo.net/magento-pdf-invoices-customer-dashboard/comment-page-1#comment-47565.
This allows a user to view invoices as PDF on the frontend of my Magento store. The problem is, when I click on the link which points to Pdfinvoice/index/invoices/order_id/5/ it shows a 404 error.
I registered the module as followed:
(renamed to module to Pdfinvoice to avoid conflict with another module)
<?xml version="1.0"?>
<config>
<modules>
<Pdfinvoice>
<active>true</active>
<codePool>local</codePool>
</Pdfinvoice>
</modules>
</config>
app/etc/modules/Pdfinvoice.xml
I am breaking my head over this.
Maybe the module isn't registered? I've tried googling it, but I can't get it to work.
Does anyone know a solution to this problem?
When you rename the module in the module definition xml, make sure you do the same with your local folder (app/code/local/Pdfinvoice), your config.xml:
app/code/local/Pdfinvoice/etc/config.xml
<config>
<modules>
<Pdfinvoice>
<version>1.0.0</version>
</Pdfinvoice>
</modules>
<frontend>
<routers>
<pdf>
<use>standard</use>
<args>
<module>Pdfinvoice</module>
<frontName>pdfinvoice</frontName>
</args>
</pdf>
</routers>
</frontend>
.. and your new controller:
app/code/local/Pdfinvoice/controllers/IndexController.php
<?php
class Pdfinvoice_IndexController extends Mage_Core_Controller_Front_Action {
public function invoicesAction() {
...
Works flawless, I installed the module in minutes.

Magento admin controller gives 404

From the instructions at Alan's blog, I have added the router in my config.xml:
<?xml version="1.0"?>
<config>
<modules>
<Clean_Integration>
<version>1.0.0</version>
</Clean_Integration>
</modules>
<admin>
<routers>
<wellnesscoach_app_redirect>
<use>admin</use>
<args>
<module>Clean_Integration</module>
<frontName>appsync</frontName>
</args>
</wellnesscoach_app_redirect>
</routers>
</admin>
</config>
And then I have my controller defined here app/code/local/Clean/Integration/Controllers/IndexController.php :
<?php
die('checkpoint1');
class Clean_Integration_IndexController extends Mage_Adminhtml_Controller_Action {
public function indexAction() {
$this->_redirectUrl('/appointments/sync/backend/');
die('checkpoint2');
}
}
When I try to open this url, it goes to the frontend side and throws a 404.
What's causing magento to not pick up this admin router?
<?xml version="1.0"?>
<config>
<modules>
<Clean_Integration>
<version>1.0.0</version>
</Clean_Integration>
</modules>
<admin>
<routers>
<integration>
<use>admin</use>
<args>
<module>Clean_Integration</module>
<frontName>appsync</frontName>
</args>
</integration>
</routers>
</admin>
Should be lower case controllers
app/code/local/Clean/Integration/controllers/IndexController.php
You may also want to put this in Adminhtml folder so that you dont run into issue in the future if you want to add a frontend and a admin controller.
app/code/local/Clean/Integration/controllers/Adminhtml/IndexController.php
One mistake I see you made is putting the controller in a folder called 'Controllers' instead of 'controllers' (case mistake).
For future reference to anyone else with this problem:
If your controller does not use the standard name of IndexController.php, you will still need to name both the file name and the class name within using the ...Controller convention.
So, if your controller lives in the Adminhtml folder, name it ExtensionController.php and name the class within My_Module_Adminhtml_ExtensionController extends ...
Credit to goes to this excellent article. HTH.

Change of Magento contacts page URL

How can I change Magento contacts page URL from /contacts to contact-us.html?
Thanks for any advice.
In the Catalog menu click on URL Rewrite Management.
Click the Add URL Rewrite button.
Choose to add a Custom type.
Enter "contacts" for ID Path and Target Path.
Enter "contact-us.html" for the Request Path.
Click the Save button.
The 'proper' way would be to create a small module similar to the below;
app/etc/modules/Organisation_Module.xml
<?xml version="1.0"?>
<config>
<modules>
<Organisation_Module>
<active>true</active>
<codePool>local</codePool>
</Organisation_Module>
</modules>
</config>
and...
app/code/local/Organisation/Module/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Organisation_Module>
<version>0.0.1</version>
</Organisation_Module>
</modules>
<frontend>
<routers>
<contacts>
<use>standard</use>
<args>
<module>Mage_Contacts</module>
<frontName>contact-us.html</frontName>
</args>
</contacts>
</routers>
</frontend>
</config>
Upload your files, clear your cache and you're good to go.
Specifically must be
New Url in ID Path and Target Path.
Old Url in Request Path
Have you tried changing the URL stub?

Resources