I installed magento 1.8.1.0 and when I click on the Show/Hide Editor button in CMS Pages or anywhere, it does nothing. I looked up in the browser's console and found out the following error.
Failed to load resource: the server responded with a status of 404 (Not Found) http://magento_address/js/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentotypo/editor_plugin.js
I looked in the magento installation folder but could not find a folder called magentotypo. I also looked in all my extensions and theme's files. How can I make it work or where can I get the referenced file?
Any help is highly appreciated.
I also faced same problem the only way i found a solution for this is I have opened my Chrome Inspector to the Console tab. I can see a the editorjs/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentotypo/editor_plugin.js was missing to load. I created a folder named as magentotypo in the same path and uploaded the file to that path
Finally after long exploring a found a solution for this.
actually these errors occur because js is not loading properly, so update your layout by a local.xml and add the following code.
<?xml version="1.0"?>
<layout>
<frontname_adminhtml_index_edit>
<update handle="editor"/>
<reference name="head">
<action method="setCanLoadTinyMce">
<load>1</load>
</action>
<action method="setCanLoadExtJs">
<flag>1</flag>
</action>
<action method="addJs">
<script>mage/adminhtml/variables.js</script>
</action>
<action method="addJs">
<script>mage/adminhtml/wysiwyg/widget.js</script>
</action>
<action method="addJs">
<script>lib/flex.js</script>
</action>
<action method="addJs">
<script>lib/FABridge.js</script>
</action>
<action method="addJs">
<script>mage/adminhtml/flexuploader.js</script>
</action>
<action method="addJs">
<script>mage/adminhtml/browser.js</script>
</action>
<action method="addJs">
<script>prototype/window.js</script>
</action>
<action method="addItem">
<type>js_css</type>
<name>prototype/windows/themes/default.css</name>
</action>
<!-- <action method="addItem">
<type>js_css</type>
<name>prototype/windows/themes/magento.css</name>
</action>-->
<action method="addCss">
<stylesheet>lib/prototype/windows/themes/magento.css</stylesheet>
</action>
</reference>
</frontname_adminhtml_index_edit>
</layout>
After this view the code by pressing ctrl+u and find if these are loaded properly or not. And if not try changing
</frontname_adminhtml_index_edit>
properly.
Hope this will resolve!
It might be because of the jquery conflicts.
Try removing the recently added JS and check WYSIWYG is working not.
The solution is (using filezilla):
Go to: / js / mage / adminhtml / wysiwyg / tiny_mce / plugins / magentowidget
Copy the file to the desktop: editor_plugin.js
Go to: / js / mage / adminhtml / wysiwyg / tiny_mce / plugins /
Create a directory called: magentotypo
Paste the file into the directory magentotypo: editor_plugin.js
Related
I'm currently developing a custom module for admin and I would like to add a custom javascript before default ones.
I tried to use :
<action method="addItem"><type>skin_css</type><name>path/to/javascript.js</name><params/><if/></action>
But this line add javascript after default like prototype.js, window.js...
Is there a way to add mine before ?
Thanks !
If you want to re-order of the JavaScript files loaded in the admin, then in your layout xml handle, you will need to remove all of the script files, then add yours and then re-add them again. Please note that your js file should be in the js folder, not the skin one.
<!-- Remove the added ones -->
<action method="removeItem"><type>js</type><name>prototype/window.js</name></action>
<action method="removeItem"><type>js</type><name>scriptaculous/builder.js</name></action>
...
<!-- Add yours -->
<action method="addJs"><script>path/to/javascript.js</script></action>
<!-- Add the removed ones after -->
<action method="addJs"><script>prototype/window.js</script></action>
<action method="addJs"><script>scriptaculous/builder.js</script></action>
...
go to app\design\frontend\rwd\default\layout page.xml (if you are using default theme otherwise go to yourtheme\default\layout) and you js here
<block type="page/html_head" name="head" as="head">
<action method="addJs">
<script>yourjs/yourjs.js</script>
</action>
<action method="addJs">
<script>prototype/prototype.js</script>
</action>
I am using Magento 1.8.1, and I couldn't find any solution to replace the text link 'My Wishlist' for icons/image links for my Mobile responsive version.
This post is following one of my previous post that you can see in the following link
However the code provided for the Wishlist is not working when I do the change in my Layout.xml with either the following one:
<customer_account>
<reference name="customer_account_navigation">
<action method="removeLinkBlock"><blockName>wishlist_link</blockName></action>
<action method="addLink" translate="label" module="wishlist" ifconfig="wishlist/general/active">
<name>wishlist</name>
<path>wishlist/</path>
<label></label>
<aParams>class="top-link-wishlist"</aParams>
</action>
</reference>
</customer_account>
or the following one:
<layout>
...
<reference name="top.links">
<action method="removeLinkBlock"><blockName>wishlist_link</blockName></action>
<action method="addLinkBlock"><blockName>wishlist_link</blockName><aParams>class="top-link-wishlist"</aParams></action>
</reference>
</layout>
So my question is where is my mistake?
I've created a child theme, with 'rwd' as the parent theme. The parent theme has this code in the 'head' block in page.xml:
<action method="addLinkRel"><rel>stylesheet</rel><href>//fonts.googleapis.com/css?family=Raleway:300,400,500,700,600</href></action>
is there a way of removing it in the child theme in local.xml?
Add this code in your local.xml file
<default>
<reference name="head">
<action method="removeItem"><type>link_rel</type><name>//fonts.googleapis.com/css?family=Raleway:300,400,500,700,600</name></action>
</reference>
</default>
This is not obvious but it is quite easy.
<action method="removeItem"><type>link_rel</type><href>//fonts.googleapis.com/css?family=Raleway:300,400,500,700,600</href></action>
The default magento template has a top link called "Login".
This is being output by the standard template customer.xml.
I did this in my local.xml, hoping to remove the current link "Login" and by readding the same link but with a different label "Login / Register"
<action method="removeLinkByUrl"><url helper="customer/getLoginUrl" /></action>
<action method="addLink" translate="label title" module="customer"><label>Log In / Register</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action>
However now i have 2 links there displaying, one called "Login" and another called "Login / Register".
How can i properly change the label of a toplink in Magento?
Try this to remove
<default>
<reference name="top.links">
<action method="removeLinkByUrl">
<url helper="customer/getAccountUrl"/>
</action>
</reference>
</default>
add by this
<reference name="top.links">
<action method="addLink" translate="label title">
<label>Log In / Register</label>
<url helper="customer/getLogInUrl"/>
<prepare/>
<urlParams/>
</action>
</reference>
i am trying to reset my test customer account password for my store, when i click on forgot password link it is asking me for a email address when i enter a valid email address it says the password reset link is sent to your mail & it is forwarding me a link in email when i click on the link it is displaying an error Fatal error: Call to a member function setCustomerId() on a non-object in /var/www/websites/jivity/app/code/core/Mage/Customer/controllers/AccountController.php on line 587 , How can i fix this error?? & Thanx in advance.
Just fixed the same problem on an upgraded 1.6.1.0 site - You are using an out of date customers.xml, diff your copy and app/design/frontend/base/default/layout/customer.xml to find the changes that need doing
If anyone is wondering, in the new version (1.6++) of the customer.xml file the following bit has been added:
<customer_account_resetpassword translate="label">
<label>Reset a Password</label>
<remove name="right"/>
<remove name="left"/>
<reference name="head">
<action method="setTitle" translate="title" module="customer">
<title>Reset a Password</title>
</action>
</reference>
<reference name="root">
<action method="setTemplate">
<template>page/1column.phtml</template>
</action>
<action method="setHeaderTitle" translate="title" module="customer">
<title>Reset a Password</title>
</action>
</reference>
<reference name="content">
<block type="customer/account_resetpassword" name="resetPassword" template="customer/form/resetforgottenpassword.phtml"/>
</reference>
</customer_account_resetpassword>
If you are in Magento 1.9.1 Here is a solution which worked for me.
If your theme doesn’t include any specific custom config or layout settings you can safely delete your customer.xml (or just rename to customer1.xml) file located at /app/design/frontend/default/<your_theme_package>/<your_theme_name>/layout/customer.xml
If you delete this file magento will load the default config options
(with the updates) from the factory default magento theme.
/app/design/frontend/base/default/layout/customer.xml
Remember to flush / refresh your magento config via administration area, this will force the customer.xml file to be reloaded.
please add below code in your costomer.xml[app/design/frontend///layout/customer.xml] file.
<customer_account_resetpassword translate="label">
<label>Reset a Password</label>
<remove name="right"/>
<remove name="left"/>
<reference name="head">
<action method="setTitle" translate="title" module="customer">
<title>Reset a Password</title>
</action>
</reference>
<reference name="root">
<action method="setTemplate">
<template>page/1column.phtml</template>
</action>
<action method="setHeaderTitle" translate="title" module="customer">
<title>Reset a Password</title>
</action>
</reference>
<reference name="content">
<block type="customer/account_resetpassword" name="resetPassword" template="customer/form/resetforgottenpassword.phtml"/>
</reference>
</customer_account_resetpassword>
It's Working
I tried the above, but didn't work. From another tip I saw, I added the same code above to the 'mageb2bextensionscustomer.xml' in the same layout folder, cleared all the cache and it works now. :-)
Always back up your files!
I found a fast way to solve the issue: I replaced the custom customer.xml used by my theme in app/design/frontend/your_theme_package/your_theme_name/layout/ with the file in app/design/frontend/base/default/layout/customer.xml.
Now it works just fine.