📜 ⬆️ ⬇️

Widget comments widget: bugreport

I want to share a tale about how we introduced a widget for Vkontakte comments on our website and what came of it. I must say that my respect for the developers of this widget has dropped very, very low, almost breaking through the level of the plinth - on the programmer’s day it will be very symbolic.

Update: Friends, more thanks to everyone for participating - the main errors were fixed yesterday in the widget; I think this is solely due to the publication here.

In my eyes, Habr once again confirmed his reputation as an IT-resource â„–1, I hope that in yours too. Thanks again to all the developers and widget developers!

But first things first.

The widget was announced by Pavel Durov on Friday night, at 2 o'clock or more. On Friday afternoon, we tried to deploy this widget: one page with only the widget code, another in the sandbox, that is, on the test version of the site.
')

Problem with json


The “clean” page (only with the widget code) opened normally in all browsers we are testing (IE, Firefox, Opera, Safari, Chrome), it was the turn of the sandbox.

The first to issue a yellow card to IE, complaining that an object suddenly turned out to be null. OK, we load Eclipse and parse the minimized code.

Our site uses mootools for some things, so it was obvious that there was a problem with it. And so it happened - mootools believes that the JSON object should be presented in a different way than the widget expects.

Conclusion 1: The prevalence of mootools is much more than the widget. Could it not be checked before the release?

Solution 1: we collect custom mootools, without including JSON, we didn’t use mootools for JSON, and nothing on this site was destroyed.

Browser problem


We did not have time to roll out the changes to the release, as complaints from users began to arrive - someone had a page with a widget that went into an endless refresh, someone just hung out.

As we try to be the most compatible site, the changes were immediately rolled back. It became clear that testing is needed for coverage, that is, the widget did not behave correctly in all browsers.

Conclusion 2: if the widget does not support any browsers, then we could have warned about this, and even better - “V Kontakte” could have themselves carried out tests for coverage.

Solution 2: take the browser version, starting from the statistics for the year and see what will be incompatible, there is no other way. And to issue the browser-specific code on the site side.

And it was here that shoals climbed.

IE6 and IE7, if the widget was seen by a person who did not log in to Vkontakte, drove the page to a permanent reload; This glitch is still not fixed. Want to check it out? Easy. Take IE7 and try to open an article from the Vzglyad site (having previously logged in from Vkontakte).

Further more. In Opera 9, the widget simply did not work. Opera 9.5 crashes to death when you try to open the site with the widget. 9.64 is already working. Safari 3.0 also provides endless page reloads. Firefox 2.0 also provides endless reloads.

Yes, I understand, you say, they say, few people go from the old Safari and Opera with Firefox, but I'm sorry, users with IE6 and IE7 are still full.

So why not reported?


And now try to contact one of the programmers from “V Kontakte” and explain this. Those who have tried it know that it is more difficult than to climb Everest.

At one time, “V Kontakte” had a rather serious problem of moderating iframe applications, do you think that you managed to contact someone? With no one. The social network "In Contact" makes it easy to connect with anyone except the developers. When we had problems with Yandex widgets, we cutely solved problems on a regular phone, which was very convenient.

A similar situation is visible today. I like the widget that they did, but the pancake was not very good and they don’t go to the contact. I hope this publication will help draw attention to this, as well as help those who decide to implement this widget in themselves.

Thanks for reading; Once again, happy programmer, friends!

Source: https://habr.com/ru/post/104129/


All Articles