WordPress.org

Making WordPress.org

Opened 2 months ago

Closed 2 months ago

#5128 closed defect (fixed)

Using the Handbook search produces a Javascript error in the console

Reported by: garrett-eclipse Owned by: dd32
Milestone: Priority: normal
Component: Handbooks Keywords:
Cc:

Description (last modified by garrett-eclipse)

Hello,

If you do a search inside the plugin handbook you see an error in the console;
`
main.js?ver=5.5-alpha-47544:212 Uncaught TypeError: Cannot read property 'open' of undefined

at initialize (main.js?ver=5.5-alpha-47544:212)
at i.h.Router (backbone.min.js?ver=1.4.0:2)
at new i (backbone.min.js?ver=1.4.0:2)
at Object.o2.start (main.js?ver=5.5-alpha-47544:507)
at HTMLDocument.<anonymous> (?s=Test:989)
at i (jquery.js?ver=1.12.4-wp:2)
at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:2)
at Function.ready (jquery.js?ver=1.12.4-wp:2)
at HTMLDocument.J (jquery.js?ver=1.12.4-wp:2)

`
Example - https://make.wordpress.org/plugins/handbook/?s=Test

It appears to be related to the o2.Notifications but am unsure beyond there.

Cheers

Change History (4)

#1 @garrett-eclipse
2 months ago

  • Description modified (diff)

#3 @dufresnesteven
2 months ago

Hack Alert
Since its currently broken and its a plugin, we could patch it for now with:

o2.Notifications = { "open": function(){}, "add": function (){} };

#4 @dd32
2 months ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 9685:

Breathe: Avoid a JS error on Handbook search results by defining a hidden o2 content area.

Props ocean90.
See #4985.
Fixes #5128.

Note: See TracTickets for help on using tickets.