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

can’t add product (says description field is required when it has text in it)
 
alexNoosa
Jr. Member
 
Avatar
Total Posts:  10
Joined:  2008-09-16
Noosa, Australia
 

Hi

I am using Magento 1.1.5

And i have the Tiny MCE WYSIWYG editor installed on the product description pages (to facilitate users of the admin system without html knowledge)

When attempting to enter a simple product, and after entering the price, title etc, I press ‘Save’ and it returns me to the description tab and says ‘This field is required’. This is when there is text and/or html in the text field.

Is there a way to disable this text field’s ‘required’ or to make the Javascript validation work?

Obviously this is a major problem to our store. If we can’t get this fixed we’re going to have to migrate to another shopping cart system.

 
Magento Community Magento Community
Magento Community
Magento Community
 
alexNoosa
Jr. Member
 
Avatar
Total Posts:  10
Joined:  2008-09-16
Noosa, Australia
 

I’ve fixed this…

Open up app/design/adminhtml/defaut/default/template/catalog/product/edit.phtml

and add these 2 lines of code under

<script language="javascript" type="text/javascript" src="<?php echo $this->getJsUrl('tiny_mce/tiny_mce.js') ?>"></script>
<script language="javascript" type="text/javascript">
Event.observe(window'load', function() {
    tinyMCE
.init({
        mode 
"exact",
        
theme "advanced",
        
strict_loading_mode true
        
elements "description,short_description",
        
theme_advanced_toolbar_location "top",
        
theme_advanced_toolbar_align "left",
        
theme_advanced_path_location "bottom",
        
extended_valid_elements "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
        
theme_advanced_resize_horizontal "true",
        
theme_advanced_resizing "true",
        
apply_source_formatting "true",
        
convert_urls "false",
        
force_br_newlines "true",
        
doctype '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
    
});

document.getElementById('description').value='<p>Enter Descripion</p>';
    
document.getElementById('short_description').value='<p>Enter Short Descripion</p>';

The 2 javascript lines must fix a problem where the TinyMCE editor requires some content to work…

 
Magento Community Magento Community
Magento Community
Magento Community
 
alexNoosa
Jr. Member
 
Avatar
Total Posts:  10
Joined:  2008-09-16
Noosa, Australia
 

apologies, that code should be

if (document.getElementById('description').value==''{
        document
.getElementById('description').value='<p>Enter Descripion</p>';
    
}
    
if (document.getElementById('short_description').value==''{
        document
.getElementById('short_description').value='<p>Enter Short Descripion</p>';
    
}
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top