WeBid Bug Tracking

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000434WeBidAuctionspublic2013-06-13 23:002016-03-22 16:55
Assigned Torenlok 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformOSOS Version
Product Version1.1.0 
Target VersionFixed in Version1.1.2 
Summary0000434: Javascript Errors on sell.php
DescriptionI noticed some javascript errors on sell.php in a clean install of 1.1.0. To reproduce the problem, create a user and log in. Click on "Sell an Item." If you use Firebug or look in the error console of your browser, you'll see the following error:

Someone wrote

"NetworkError: 404 Not Found - http://www.thedomain.com/home/hostingusername/public_html/WeBid/ckeditor/ckeditor.js?t=A8LE4JO"[/QUOTE] [^]

That error comes from line 553 in sell.php:

$CKEditor->basePath = $main_path . 'ckeditor/';

Since this is output on line 348 of the actual source code of the web page, I think that it should be the URL to the ckeditor folder rather than the actual path on the server. I got rid of that error by using the following for line 553 in sell.php:

$CKEditor->basePath = 'ckeditor/';

Once that was fixed, I found that the following error occurs when you click the "yes" or "no" by "Buy Now":

Someone wrote

TypeError: bn is not a function

http://www.thedomain.com/WeBid/sell.php[/url] [^] Line 220

(I checked and this error occurred before the change of the basePath, too.) Well, bn is definitely a function; I can see it on line 225 of the HTML output by sell.php, so I suspect there is another javascript error or issue somewhere that's causing the problem.

I noticed that ckeditor.js is being loaded twice, once in header.php on line 46, and again when sell.php sets the description field on line 645.

Sometimes, having two versions of the same javascript file can cause this kind of error, so I commented out line 46 of header.php, making ckeditor.js load only one time, but I still got the "bn is not a function error" when clicking the Buy Now options.

I'm at a loss on this one.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
linux4me (reporter)
2013-06-14 16:09
edited on: 1970-01-01 00:00

It finally dawned on me whey the error "bn is not a function" is happening.

Javascript is getting confused by the function bn and the input with the id of "bn."

The fix is to rename the function "bn" in sell.tpl to something else, like "bin" and replace the three calls to the function accordingly.

What I did is do a search and replace in sell.tpl for
Someone wrote

and replace it with
Someone wrote

then clear the cache and all is good. The fee amount will update correctly and the error is gone.
Box Lot (reporter)
2013-06-18 02:25
edited on: 1970-01-01 00:00

Thanks, keep up the great work and detailed testing!

- Issue History
Date Modified Username Field Change
2015-04-01 13:17 renlok New Issue
2015-04-01 13:17 renlok import_id => 436
2015-04-01 13:17 renlok Date Submitted 2015-04-01 13:17 => 2013-06-13 23:00
2015-04-01 13:17 renlok Last Update 2015-04-01 13:17 => 2013-06-18 02:25
2016-03-22 16:55 renlok Status new => resolved
2016-03-22 16:55 renlok Fixed in Version => 1.1.2
2016-03-22 16:55 renlok Resolution open => fixed
2016-03-22 16:55 renlok Assigned To => renlok

Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker