Magento Forum

   
Page 1 of 3
Upgrade to 1.5.1.0 stable - Admin Order Creation not working… Unable to add products
 
Flipmedia
Member
 
Avatar
Total Posts:  41
Joined:  2009-09-24
 

Hi

Following what appears to have been a successful upgrade from 1.4.2.0 to 1.5.1.0 I now find that I am unable to create an order via the admin area. ADMIN: Sales -> Orders: [Create New Order]

On researching this issue I note that it seems to be an bug that was supposedly fixed in the very realise I have installed…

Release Notes - Magento 1.5.1.0 (April 26, 2011)
Fixed “Items Ordered” tab is not refreshing while Admin order creation

I upgraded to the new version via a complete clean installation of 1.5, building the required extension stack on the clean installation and then once ready, removing the local.xml… restarting the installation and pointing the fresh Magento 1.5 install at the current database (1.4.2.0)… All seemed to work perfectly, after the normal configuration tweaking…

I am a little suspicious that the exact issue is noted as fixed that I seem to be expereincing… But I cannot see how the fixed code would not have been installed given the method I used to upgrade.

Using ./mage I am able to provide the following list of installed extensions etc…

# ./mage config-set preferred_state beta
Success

# ./mage list-installed
Installed package for channel 'community' :
Mage_All_Latest      1.5.1.0 stable      
Interface_Adminhtml_Default 1.5.1.0 stable      
Interface_Frontend_Default 1.5.1.0 stable      
Interface_Install_Default 1.5.1.0 stable      
Mage_Downloader      1.5.0.0 stable      
Mage_Centinel        1.5.0.0 stable      
Interface_Frontend_Base_Default 1.5.1.0 stable      
Phoenix_Moneybookers 1.2.5 stable        
Find_Feed            1.0.8 stable        
Mage_Compiler        1.5.0.0 stable      
Magento_Mobile       1.5.0.0.20 stable   
Mage_Core_Adminhtml  1.5.1.0 stable      
AW_Blog              1.0.21 stable       
Camiloo_Amazonimport 2.2.1.1 stable      
UK_Postcode_Address_Finder 2.3.3 stable        
Desitex_Singleproductcat 1.0.0 stable        
Ebizmarts_MailChimp  3.0.1 stable        
Fooman_GoogleAnalyticsPlus 0.10.5 beta         
Indust_CustomShippingRate 1.5.0 beta          
MageParts_CEM        1.0.3 stable        
RicoNeitzel_VertNav  0.3.0 stable        
Testimonials_Pro     1.3 stable          
Webshopapps_Matrixrate 4.1.0 stable        
Webshopapps_Orderexport 2.4.1 stable        

# ./mage list-upgrades
No upgrades available

Advice / help is greatly appreciated…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Flipmedia
Member
 
Avatar
Total Posts:  41
Joined:  2009-09-24
 

Undertaking browser testing…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Flipmedia
Member
 
Avatar
Total Posts:  41
Joined:  2009-09-24
 

In reviewing this issue further, it occurred to me that is was most likely a client side / javascript issue and as a result might be a browser / platform specific issue…

I have tested the admin order creation on the following… all are affected:-

Internet Explorer 8 - Windows Vista
Firefox 3.6 - Mac OS X
Chrome (11.0.696.71) - Mac OS X

Note to all: All browser caches were cleared before testing the above…

Odd observations:-
---
Internet Explorer is showing a javascript error on order page load: “productConfigure is not defined” - likely to be the cause of this issue…

Also…

Firefox when profiling the page load / usage using firebug… The page actually opperates correctly allowing the product to be added!!!

Aside from the Firefox / Firebug combo working… For the normal user the create order via the admin area is broken in Magento 1.5

 
Magento Community Magento Community
Magento Community
Magento Community
 
ltlfoote
Jr. Member
 
Total Posts:  7
Joined:  2009-09-28
 

I just upgraded from 1.3 to 1.5, I am able to create an order fine but cannot add or edit products. Your post title mentioned you cannot add products, did you get that error fixed? From my logs, the error I am receiving is “Sorry, your PCRE extension does not support UTF8 which is needed for the I18N core in /var/www/vhosts/shopforparties.com/httpdocs/lib/Zend/Locale/Format.php on line 769” My admin update PCRE extensions and verified that it is set to support UTF8.

Looking for a solution and just curious if this is the same problem that you are having.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Flipmedia
Member
 
Avatar
Total Posts:  41
Joined:  2009-09-24
 

Sorry your issue is unrelated to ours…

The issue is we are unable to add products to an order being created via the admin area.

The system allows a product to be selected but once submitted it does not appear in the product section of the order. Working with an existing customer record we can add products from their wish list or prior orders but whilst the product is added it does not update the order totals.

The issue is clearly a problem with the Admin html javascript..

Your issue relates to server side software PCRE, most likely you will need to upgrade your versions of the PHP extensions or work on configuration. I recall having to upgrade PCRE when we upgraded from 1.3 to 1.4, the error you are expereicing I think is a bit of a red herring…

Good luck with resolving your issue L

Side note: We have expereinced issues with 1.4 and 1.5 admin interface when trying to add products to categories, when using IE9, simply changing the “compatibility” mode in IE9 fixes these.

 
Magento Community Magento Community
Magento Community
Magento Community
 
miked2004
Sr. Member
 
Avatar
Total Posts:  214
Joined:  2007-12-13
Atlanta, Georgia
 

I tried upgrading to 1.5.1.0 from 1.4.1.1 and had this same issue: “not able to add products to admin order” because there is no product selector. Did anyone find a fix?

P.S. I also did a clean install of magento 1.5.1.0 and it even had this issue.  WTF

 
Magento Community Magento Community
Magento Community
Magento Community
 
apparelforall
Jr. Member
 
Total Posts:  2
Joined:  2011-06-10
 

I am having the same issue. Anyone have a fix?

 
Magento Community Magento Community
Magento Community
Magento Community
 
miked2004
Sr. Member
 
Avatar
Total Posts:  214
Joined:  2007-12-13
Atlanta, Georgia
 

My issue was that I was that my php version was not high enough. they must have raised it with one of the Version Releases.

 
Magento Community Magento Community
Magento Community
Magento Community
 
barnyshergold
Member
 
Avatar
Total Posts:  53
Joined:  2011-02-05
 

Just dropped the 1.5.1.0 Core into a copy of our 1.4.1.1 system (we have a clean core) and after a few hiccups, the system upgraded the database and now runs - front and back.

However we are having the same order problem as the OP - when we add a product it doesn’t update the order.

Also in IE9 we get this error :

Webpage error details

User Agent
Mozilla/4.0 (compatibleMSIE 8.0Windows NT 6.1Trident/4.0SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729Media Center PC 6.0MDDSInfoPath.3; .NET4.0C)
TimestampTue14 Jun 2011 17:28:01 UTC


Message
'productConfigure' is undefined
Line
3494
Char
9
Code
0
URI
http://admin.internal/index.php/admin/sales_order_create/

This relates to this block of code :

<script type="text/javascript">
order.sidebarHide();
Event.observe(window, ‘load’, function() {
productConfigure.addListType(’product_to_add’, {
urlFetch: ‘http://admin.internal/index.php/admin/sales_order_create/configureProductToAdd/’
});
productConfigure.addListType(’quote_items’, {
urlFetch: ‘http://admin.internal/index.php/admin/sales_order_create/configureQuoteItems/’
});
});
</script>

This is driving me crackers. We are using PHP 5.2.13 on Apache if that helps.

Does ANYONE have any ideas what this is about? A long search on Google just keeps coming back to this thread.

 
Magento Community Magento Community
Magento Community
Magento Community
 
barnyshergold
Member
 
Avatar
Total Posts:  53
Joined:  2011-02-05
 

PROBLEM SOLVED - FOR US

With regards to the problem of products being added to the Admin order screen and the page not refreshing the product area but if you refresh the page manually (eg page reload) the products appear; I have solved this in our system.

We discovered a 3rd party extension that called the JS file extjs/ext-tree.js without checking if it was allowed.

This JS file conflicts with something else loaded on the page and prevents the product area from refreshing.

Just view the source of the Admin order page and look for this file in the header. If it is there then this is your problem.

Search the system for any layout (or other file) that loads this file. You may see it loaded like this :

<action method="addItem">
                <
type>js</type>
                <
name>extjs/ext-tree.js</name>
            </
action>

The CORRECT way for this to be handled is thus :

<action method="addItem">
                <
type>js</type>
                <
name>extjs/ext-tree.js</name>
                <
params/><if/><condition>can_load_ext_js</condition> <!-- REQUIRED FOR MAGENTO 1.5.-->
            </
action>

The conditional check will prevent this JS script from loading in the order page. If you do change any XML files, don’t forget to delete your cache folder (or rebuild it)

I hope this fix works for other people on this thread.

Regards

Barny

 
Magento Community Magento Community
Magento Community
Magento Community
 
Novusweb
Sr. Member
 
Avatar
Total Posts:  89
Joined:  2009-05-06
Texas
 
NikolaiDante - 17 June 2011 08:12 AM

PROBLEM SOLVED - FOR US

With regards to the problem of products being added to the Admin order screen and the page not refreshing the product area but if you refresh the page manually (eg page reload) the products appear; I have solved this in our system.

We discovered a 3rd party extension that called the JS file extjs/ext-tree.js without checking if it was allowed.

This JS file conflicts with something else loaded on the page and prevents the product area from refreshing.

Just view the source of the Admin order page and look for this file in the header. If it is there then this is your problem.

Search the system for any layout (or other file) that loads this file. You may see it loaded like this :

<action method="addItem">
                <
type>js</type>
                <
name>extjs/ext-tree.js</name>
            </
action>


/app/design/adminhtml/default/default/layout/main.xml is the only file I can find that has \"extjs/ext-tree.js\" anywhere in the code. We\’re using 1.5.1 and here\’s what is there on line 101:

<action method=\"addItem\"><type>js</type><name>extjs/ext-tree.js</name><params/><if/><condition>can_load_ext_js</condition></action>

Which appears to be what you proposed would fix the issue. However, it is not, unfortunately.

Does anyone have any other ideas on how to solve this?

The CORRECT way for this to be handled is thus :

<action method="addItem">
                <
type>js</type>
                <
name>extjs/ext-tree.js</name>
                <
params/><if/><condition>can_load_ext_js</condition> <!-- REQUIRED FOR MAGENTO 1.5.-->
            </
action>

The conditional check will prevent this JS script from loading in the order page. If you do change any XML files, don’t forget to delete your cache folder (or rebuild it)

I hope this fix works for other people on this thread.

Regards

Barny

 
Magento Community Magento Community
Magento Community
Magento Community
 
Flipmedia
Member
 
Avatar
Total Posts:  41
Joined:  2009-09-24
 

SOLVED [NikolaiDante] Please read carefully and be warned, I am yet to test if this “fix” impacts on anything / any other function…

I reviewed NikolaiDante fix...

The inclusion of extjs/ext-tree.js is part of the core build and the inclusion of this javascript file is performed via:

/magento/app/design/adminhtml/default/default/layout/main.xml

This is also the file that must be edited to implement this fix…

As pointed out by NikolaiDante, the xml config that includes this file must have an if condition… As my install was completely fresh my build did have the apprioprate “if” condition… As follows:

<action method="addItem"><type>js</type><name>extjs/ext-tree.js</name><params/><if/><condition>can_load_ext_js</condition></action>

In order to get this to work / exclude the ext-tree.js from the areas of the admin interface where it is not required, I change the shorthand xml if condition to a longhand (Note the <if> part below)… As follows:

<action method="addItem"><type>js</type><name>extjs/ext-tree.js</name><params/><if><condition>can_load_ext_js</condition></if></action>

Clear / refresh cache for configurtion / xml layout…

Please note: This appears to work in that, extjs/ext-tree.js is not included in the head of the create order admin page and products can now be added to the order table. I am yet to completely test this and with no documentation with regard to where ext-tree.js is required, it is a little diffcult to tell if it is being included where it should be.

It may be that it is being excluded from everywhere following this change… In turn this may break another part of the admin interface!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Novusweb
Sr. Member
 
Avatar
Total Posts:  89
Joined:  2009-05-06
Texas
 

Sorry, but that solution *kinda* works. Adding products works fine, but the whole Category tree doesn’t appear anymore.

Somehow, the ext-tree.js being used on the Order page appears to be what is causing the issue, but I haven’t figure out yet how to disable it for that page.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Flipmedia
Member
 
Avatar
Total Posts:  41
Joined:  2009-09-24
 
Novusweb - 28 June 2011 10:29 AM

Sorry, but that solution *kinda* works. Adding products works fine, but the whole Category tree doesn’t appear anymore.

Somehow, the ext-tree.js being used on the Order page appears to be what is causing the issue, but I haven’t figure out yet how to disable it for that page.


Novusweb
: You are indeed correct and as I feared the “fix” did in fact exclude the ext-tree.js from everywhere and in turn broke the category management page…

I am confused as to why the order creation requires the ext-tree.js (category render / expasion)… I am going to research “can_load” function as this seems to be at fault.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Novusweb
Sr. Member
 
Avatar
Total Posts:  89
Joined:  2009-05-06
Texas
 

Thanks. That would be wonderful. I’ve been looking over the various files, trying to comment out some items, but nothing seems to eliminate the ext-tree.js from where we need it excluded.

Hopefully you or someone else better versed can solve this.

And help me retain what hair I have left.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Novusweb
Sr. Member
 
Avatar
Total Posts:  89
Joined:  2009-05-06
Texas
 

In Safari Web Inspector, when clicking Add Selected Product(s) to Order, I was seeing an js error for giftmessage.js.

So, I began tracking that down.

In /js/mage/adminhtml/giftmessage.js, this is what was at lines 167-169:

var newPopupContainer = $('gift_options_configure_new');
$(
document.body).insert({topnewPopupContainer});
newPopupContainer.id 'gift_options_configure';

Now, I’m not a brilliant js guy, by any stretch, but I thought I would try changing line 169 to:

newPopupContainer.id 'gift_options_configure_new';

And, voila! It worked. Products showed up. The sun rose in the East.

Still testing to make sure everthing else is in place, but so far, so good.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 3