1

For whatever reason, all of a sudden I can’t add products to orders I create in the backend of my site running Magento 1.7.0.2. I’ve tried everything I could think of (disabling APC, javascript merging turned off, mod pagespeed turned off, no compilation, disabled caching, etc...).

In Chome's Java debugger I do see a lot of DOMExceptions being thrown when I try to create a new order and add products.

Specifically line 3334 in contentscript.js

var c = window.getSelection().getRangeAt(0).cloneContents().textContent;

Throughout the rest of the order creation process I get some in prototype.js and jquery.main.js I’m not sure if these are intended or shouldn’t be thrown. They are in try/catch blocks.

This is really a big pain especially since I have no idea why it just seemingly randomly stopped working. I haven't installed any new extensions and I've tried disabling all the extensions I have.

I've also seen Magento - Cannot add products to a manual order within backend of the Admin Panel which has the same problem but I guess a different solution since I tried replacing prototype.js with the one included in the Magento 1.7.0.2 files. I've never modified the js files.

Community
  • 1
  • 1
Alchitry
  • 1,369
  • 1
  • 16
  • 29

2 Answers2

1

If no code has changed previously that you are aware, a possibility is your hosting provider may have done an upgrade or update recently causing the odd behaviour.

Also consider trying a different browser, if Chrome/Firefox disable all plugins/modules and use an incognito mode to ensure fresh session/cookies.

With that said, I also found searching just for contentscript.js is mostly around: http://developer.chrome.com/extensions/content_scripts.html

Anyhow here's some steps I would take to help identify the issue:

Developer Mode:

Enable Magento's developer mode (index.php or SetEnv .htaccess) Enable all system, exception logging in the admin. (System->Configuration->Developer->LogSettings)

Default Theme

Reset your theme/skin to the base/default version.

Disable all Cache

Disable caching, Flush cache storage, disable JS/CSS Merging.

Since you mentioned already tried disabling modules, did that include the community code pool and enabling developer mode?

Disable Local Modules:

Disable the local codepool via etc/local.xml

Disable 3rd Party Community Modules:

Create a new directory called disabled under etc/Modules/ Move all NON Magento standard module XML definitions to the disable directory.

These should get you back to a stock version of Magento and debugging mode to help determine where the problem is occurring. Be sure and also check PHP's logs for any oddities as well.

Sonassi has posted a good guide similar to what I mentioned above here: https://magento.stackexchange.com/questions/428/fundamentals-for-debugging-a-magento-store/429#429

Community
  • 1
  • 1
B00MER
  • 5,471
  • 1
  • 24
  • 41
  • I've tried all of that and it still doesn't work or even log any errors. I do have a backup for a little over a week ago that works. However, I've received a lot of orders from then and had new customers sign up. I've tried using Chrome, the "Add products" button goes away. I've tried FireFox, the entire products, payment method, and shipping method boxes go away. For some reason I can't log in with Internet Explorer. I thought it may have been an updated package, but I've booted the backup and updated everything and it still works. – Alchitry Aug 22 '13 at 14:20
0

I ended up hiring a developer to find the problem.

It only occurs when the payment method "Bank Transfer Payment" is enabled. A simple fix is to just disable it.

If you need to use this payment method my dev found if you copy app/design/frontend/base/default/template/payment/form/banktransfer.phtml to app/design/adminhtml/default/default/template/payment/form/ it works.

cp app/design/frontend/base/default/template/payment/form/banktransfer.phtml app/design/adminhtml/default/default/template/payment/form/

This is for magento 1.7.0.2

Alchitry
  • 1,369
  • 1
  • 16
  • 29