iolevel / wpdotnet-sdk

WordPress compiled to .NET Standard. SDK for ASP.NET Core.
http://www.wpdotnet.com
Other
414 stars 69 forks source link

Critical error when entering the page editor #96

Closed marinasundstrom closed 3 years ago

marinasundstrom commented 3 years ago

Cannot launch the post editor due to error.

Problem

I try to edit a page in the admin interface, and get this error:

Screen Shot 2021-03-11 at 13 49 11

The error message is:

TypeError: Cannot read property 'align' of undefined
    at i.resetDisplays (http://localhost:5004/wp-includes/js/media-views.js?ver=5.6:1044:49)
    at initialize (http://localhost:5004/wp-includes/js/media-views.js?ver=5.6:988:8)
    at i.h.Model (http://localhost:5004/wp-includes/js/backbone.min.js?ver=1.4.0:2:4172)
    at i.constructor (http://localhost:5004/wp-includes/js/media-views.js?ver=5.6:617:18)
    at new i (http://localhost:5004/wp-includes/js/backbone.min.js?ver=1.4.0:2:23610)
    at i.createStates (http://localhost:5004/wp-includes/js/media-views.js?ver=5.6:3357:4)
    at initialize (http://localhost:5004/wp-includes/js/media-views.js?ver=5.6:3306:8)
    at i.h.View (http://localhost:5004/wp-includes/js/backbone.min.js?ver=1.4.0:2:14225)
    at i.constructor (http://localhost:5004/wp-includes/js/wp-backbone.js?ver=5.6:503:18)
    at i.constructor (http://localhost:5004/wp-includes/js/media-views.js?ver=5.6:2688:20)

Impact

I cannot edit any post anymore.

Questions

Is it due to a database upgrade I was prompted to a while ago?

jakubmisek commented 3 years ago

this is a JS error that might be related to #95 ?

marinasundstrom commented 3 years ago

this is a JS error that might be related to #95 ?

I don't know.

I assume that this is not affected by Customize.php.

marinasundstrom commented 3 years ago

Removing the code that set the Thread.CurrentCulture solved this.

jakubmisek commented 3 years ago

Thank you for checking it so quickly. I've created an issue for culture-specific numeric conversions (https://github.com/peachpiecompiler/peachpie/issues/922)