Closed Bug 763229 Opened 12 years ago Closed 11 years ago

clicking on post editor buttons on mybb introduces a single [undefined=undefined]. Tag is undefined appears in error console

Categories

(Tech Evangelism Graveyard :: English US, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: danialhorton, Unassigned)

References

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/16.0 Firefox/16.0a1
Build ID: 20120609030536

Steps to reproduce:

Went to edit a post on a forum with bold text via the button bar



Actual results:

[undefined=undefined] was wrapped around the selected text


Expected results:

[b] and [/b] should have been around the text
Summary: clicking on post editor buttons on mybb introduces a single [undefined=undefined] → clicking on post editor buttons on mybb introduces a single [undefined=undefined]. Tag is undefined error occurs in error console
Summary: clicking on post editor buttons on mybb introduces a single [undefined=undefined]. Tag is undefined error occurs in error console → clicking on post editor buttons on mybb introduces a single [undefined=undefined]. Tag is undefined appears in error console
Can you link to the page showing the problem?  This sounds like a possible bug in the forum software, unless it's a regression...
http://community.mybb.com/thread-120204.html

i posted to their software support board, but the issue is not reproducible under aurora, it only started after PGO Green merge after nightly went Fx 16.
Danial, if you can reproduce reliably, would you be willing to find a regression range on inbound?
i actually started testing on inbound when i noticed it, since the only big change to 16 was the PGO Green merge directly after 15 went to aurora branch.

unfortunately i lack the time to really dig into inbound this week and maybe for most of next week.
Component: General → Editor
QA Contact: general → editor
I did some initial investigation here.  It actually doesn't seem like bug 761306 is at fault here, as none of the code that bug added is even called in this case.  I'm bisecting the range right now.
The first bad revision is:
changeset:   95807:28dd33748be5
user:        David Zbarsky <dzbarsky@gmail.com>
date:        Mon Jun 04 16:49:57 2012 -0700
summary:     Bug 591467 - Implement HTML5 Microdata API r=bz
Blocks: 591467
Component: Editor → DOM
QA Contact: editor → general
Keywords: regression
thanks Ehsan
Interesting.  Is the page using one of the property names the microdata API defines?

Ehsan, what page were you testing on?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Boris, clicking Reply on the forum thread i linked (account required) brings up the full post editor, the bold, italic, and all other font and format + bbcode items on the editor toolbar produce [undefined=undefined] in the post text box.

The first time you click one of the buttons, you may get the bbcode to load, but clicking any button after this will produce the [undefined=undefined] and an error in the error console
Account, sigh.

Anyway, I got one.  The relevant bits are in http://community.mybb.com/jscripts/editor.js?ver=1600 and look like this:

		dropdown.itemType = options.type;
...
		if(!element.itemType)
			element = this.getElementToolbarItem(element);
...
		button.itemType = options.type;

Since the microdata API adds an itemType property that returns objects (e.g. element.itemType will never test false now), this code's behavior certainly changed.

I bet simply removing itemType from HTMLElement would fix this site.

If so, our options are to break this site and evangelize or to get the spec changed.  My preference is somewhat for the latter.
I hope this one can be evanged. I have filed an OTW bug in Opera's bug database to hopefully help with that.
Danial, have you already contacted the script authors, or should I try to?
Yeah, got their typical reponse "We won't fix a bug that exists for in-development browsers."


I can't expect much from a group of "mostly kids" playing developers
Fun.  Well, it's a bug in shipping Opera, and it'll be a bug in shipping Firefox soon enough....  And WebKit is working on this too, iirc.

The big question is whether this is the only page on the web using .itemType.....
Of the "top 10,000" from http://www.paciellogroup.com/blog/2012/04/html5-accessibility-chops-data-for-the-masses/

$ grep -aPhc "\.itemType([\s=;,]|$)" stevef-all
0

From http://dotnetdotcom.org/

$ grep -aPh "\.itemType([\s=;,]|$)" web200904 
  bookmark.itemType = ITEM_TYPE_BOOKMARK;
  bookmark.itemType = ITEM_TYPE_BOOKMARK;
  bookmark.itemType = ITEM_TYPE_BOOKMARK;
  bookmark.itemType = ITEM_TYPE_BOOKMARK;

This is from one page, http://www.diigo.com/list/levendleren/voorbeeld which now has ditem.itemType = ITEM_TYPE_DITEM; but AFAICT from the script, ditem is not an element.

Note: none of these data sets include external scripts, but it usually is a pretty good indicator anyway.
It is?

It only takes one reasonably common external script to royally screw you over if you base your decisions on data like that....
Feel free to research external scripts. :-)
In case it might be of any help, I too am experiencing the issue with a Mybb forum, per the OP:  
Danial Horton 2012-06-09 14:10:30 PDT
Summary: clicking on post editor buttons on mybb introduces a single [undefined=undefined]
  
Though I can't be sure, it does seem likely to have begun with Ff Nightly 16 and is still the case with 16.0a1 (2012-07-11).  It's been happening for a coupla weeks now for me.

This is the website: http://marcstevens.net/board/index.php
Its something MyBB has to fix on their end, opera is also affected.
OS: Windows 7 → All
Hardware: x86_64 → All
Based on comment 21 I'm untracking this for 16 since it seems like there's nothing for us to do here. Please re-nominate if that changes.
Blocks: 800850
Well, what we needed to do for 16 was either back out or evangelize.  Did we do either one?
(In reply to Boris Zbarsky (:bz) from comment #23)
> Well, what we needed to do for 16 was either back out or evangelize.  Did we
> do either one?

No, seems like we untracked it in comment 22 and then just dropped the ball.  :(
Assignee: nobody → english-us
Component: DOM → English US
Product: Core → Tech Evangelism
Version: Trunk → unspecified
(In reply to Boris Zbarsky (:bz) from comment #23)
> Well, what we needed to do for 16 was either back out or evangelize.  Did we
> do either one?

We don't have the bandwidth to evangelize every issue, and this doesn't really qualify as critical. This will be fixed in mybb 1.6.9 - http://dev.mybb.com/issues/2092.
can someone resolve this as fixed?
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.