Blog

Undefined Index URL Error In Email Template For Magento 1.3.2.4

Tags: cPanelEmail TemplateHTML EncodingmagentoUndefined Index

Published on: April 30, 2012 by Scott S

Undefined Index URL Error In Email Template For Magento 1.3.2.4

Scenario:

Since we provide Magento installation and Magento Migration support to our clients, we often came across this error. Before we start we should know where exactly we get this error in a Magento website. We get this error while trying to preview an email template or loading a template etc using the Transactional email options in your Magento admin panel.

STEPS TO DUPLICATE THE ISSUE:

Login to your Magento admin panel by following http://yourdomainname.com/admin


(Click to enlarge images)

Goto Transactional Emails under the system tab.

Add a new template using the Add New Template option.

Here you can see an option to Load a default Template

Select a template from the Template drop down box and then select Load Template so that the loaded template information gets loaded in the Template Information area which is just below.

Now trying to preview the template using the Preview Template option gives you the Undefined index: url error as shown in the screenshot.

ERROR:

Notice: Undefined index: url in /home/username/public_html/app/code/core/Mage/Core/Model/Email/Template/Filter.php on line 253

Trace: #0 /home/username/public_html/app/code/core/Mage/Core/Model/Email/Template/Filter.php(253): mageCoreErrorHandler(8, ‘Undefined index…’, ‘/home/username/…’, 253, Array)

#1 /home/username/public_html/lib/Varien/Filter/Template.php(134): Mage_Core_Model_Email_Template_Filter->storeDirective(Array)

#2 /home/username/public_html/app/code/core/Mage/Core/Model/Email/Template.php(283): Varien_Filter_Template->filter(Array, Array)

#3 /home/username/public_html/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php(50): Mage_Core_Model_Email_Template->getProcessedTemplate(‘

Troubleshooting:

As you can see, in the Template Information section the Template Content is filled up with some codes as shown below.

——————————————————

<td valign=”top”><a href=”{{store%20url=” “}}”=””><img src=”{{skin%20url=” images=”” logo_email.gif”=”” _area=”frontend” }}”=”” alt=”Magento” style=”margin-bottom: 10px” border=”0″ /></a></td></tr></tbody></table><!– [ middle starts here] –>

——————————————————

In the above codes you can find a character %20 . What exactly is this? This is HTML URL Encoding . URL encoding converts characters into a format that can be transmitted over the Internet.

The codes in templates for certain Magento versions have HTML encoding of certain characters. In HTML URL encoding %20 stands for a blank space. To overcome this issue, replace the %20 in the Template Content code with a blank space.

In the above code for Template, you can see the store url is defined as store%20url, which is the reason for the error. Replace the %20 with a blank space as shown below:

——————————————————

<td valign=”top”><a href=”{{store url=” “}}”=””><img src=”{{skin url=” images=”” logo_email.gif”=”” _area=”frontend” }}”=”” alt=”Magento” style=”margin-bottom: 10px” border=”0″ /></a></td></tr></tbody></table><!– [ middle starts here] –>

——————————————————

Wherever you find a %20 in the template code replace it with a blank space.
You can learn more about HTML URL encoding from search engines like Google. Here is one such tutorial for HTML URL ENCODING http://www.tutorialspoint.com/html/html_url_encoding.htm .

Now use the Preview option to preview your template. You will get an output as shown below:

Bingo!! You have done it!!

For Magento installation and Magento site migration support, please do contact our 3rd party software installation team and Data Migration team respectively

Category : magento

Scott S

Scott S

Scott follows his heart and enjoys design and implementation of advanced, sophisticated enterprise solutions. His never ending passion towards technological advancements, unyielding affinity to perfection and excitement in exploration of new areas, helps him to be on the top of everything he is involved with. This amateur bike stunting expert probably loves cars and bikes much more than his family. He currently spearheads the Enterprise Solutions and Infrastructure Consultancy wing of SupportSages.

You may also read:

Comments

Add new commentSIGN IN

Let's Connect

Categories

Your Cart

Cart is empty.

Subtotal
₹0.00
APPLY
0
Send this to a friend