again https://forum.italia.it/ Topic is solved

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
Lucio Chiappetti
Astronaut
Astronaut
Posts: 654
Joined: 2014-09-01, 15:11
Location: Milan Italy

again https://forum.italia.it/

Unread post by Lucio Chiappetti » 2023-01-18, 22:05

This was discussed already in viewtopic.php?f=70&t=28667 which was closed.

I get a "your browser is not supported". I tried to change the useragent override proposed there from version 102 to version 109 of firefox, but seems not to have effect. Seems something related to the discourse engine (? or environment or whatever it is)

I am not sure I know how to cut-and-paste the entire content of console error (rather long). I did a copy but it copied only the first line, I guess the offending one is the "uncaught exception" ...

Code: Select all

Timestamp: 18/01/23 22:54:03
Error: ReferenceError: define is not defined
Source File: https://forum.italia.it/assets/plugins/discourse-narrative-bot-52768d4ccc5bca7963dad11040f6ebefe20ac500149dac4dedea1961c74f4eeb.js
Line: 1
....
Timestamp: 18/01/23 22:54:03
Error: uncaught exception: Unsupported browser detected
And this should be the site of the Agency for Digital Transformation of the Italian Government :( :thumbdown: :twisted:
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35484
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: again https://forum.italia.it/

Unread post by Moonchild » 2023-01-19, 00:27

Unsupported browser detected
Seems the digitalization of Italy is subject to a short list of "approved browsers"
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Lucio Chiappetti
Astronaut
Astronaut
Posts: 654
Joined: 2014-09-01, 15:11
Location: Milan Italy

Re: again https://forum.italia.it/

Unread post by Lucio Chiappetti » 2023-01-19, 11:22

I think it is related to discourse search.php?search_id=newposts
Anyhow, setting compatibility mode to Native or Gecko (my setting is Firefox) as suggested in the other thread does not change anything for https://forum.italia.it/
Last edited by Lucio Chiappetti on 2023-01-19, 13:03, edited 1 time in total.
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 933
Joined: 2021-01-26, 11:18

Re: again https://forum.italia.it/

Unread post by Kris_88 » 2023-01-19, 12:37

try UA override
general.useragent.override.italia.it;Android 12

Lucio Chiappetti
Astronaut
Astronaut
Posts: 654
Joined: 2014-09-01, 15:11
Location: Milan Italy

Re: again https://forum.italia.it/

Unread post by Lucio Chiappetti » 2023-01-19, 13:03

Thanks for your interest but it does not work. If you put "Android 12" you bypass the "discourse" useragent check, but you are still unable to log in (the login button is hidden, irrespective of the page zoom). Yoou simply suppress the "use supported browser" messages.
It is true that you can navigate the site (that is true even with the older useragent) ... buyt you can't login, hence post.

BTW the useragent I use now is Mozilla/5.0 (%OS_SLICE% rv:109.0) Gecko/20100101 Firefox/109.0 (the same it worked in July as suggested y Moonchild, but with 102 replaced by 109). Should I change some other version number (5.0 or 20100101) ? I doubt they (discourse) use plain useragent sniffing though.
I may file a complaint (with Forum Italia, not discourse), but I strongly doubt they'll listen.
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 933
Joined: 2021-01-26, 11:18

Re: again https://forum.italia.it/

Unread post by Kris_88 » 2023-01-22, 04:37

There is a slightly modified solution from adoxa ( viewtopic.php?f=70&t=29327 ), adopted for forum.italia.it.

1) Install Modify HTTP Response add-on.
I took it from here: https://addons.thunderbird.net/rU/firef ... -response/

2) Set "filters" field on the add-on's options page.

Code: Select all

[["forum.italia.it",["/browser-detect-/",["/.*/g",""]],["/vendor-5a19/",["t.discourse.hoisted??={}","t.discourse.hoisted??(t.discourse.hoisted={})","n??=[]","n||(n=[])","t[e]??=[]","t[e]??(t[e]=[])","r||={}","r||(r={})"]],["/discourse-f7231/",["e.draft||=t.draft","e.draft||(e.draft=t.draft)","n||={}","n||(n={})","f[e]??=[]","f[e]??(f[e]=[])","t.__registry__._typeInjections.service??=[]","t.__registry__._typeInjections.service??(t.__registry__._typeInjections.service=[])"]]]]
You can remove unnecessary UA override and the UBlock rules for the forum.italia.it. The Greasemonkey script is not needed either.

Lucio Chiappetti
Astronaut
Astronaut
Posts: 654
Joined: 2014-09-01, 15:11
Location: Milan Italy

Re: again https://forum.italia.it/

Unread post by Lucio Chiappetti » 2023-01-22, 13:09

Thanks, I was following the other thread, but I could not figure out where to get the extension (it is not in the Pale Moon repository).
Your instruction work perfectly after a browser restart
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

Lucio Chiappetti
Astronaut
Astronaut
Posts: 654
Joined: 2014-09-01, 15:11
Location: Milan Italy

Re: again https://forum.italia.it/

Unread post by Lucio Chiappetti » 2023-01-29, 19:26

Sorry, but after I upgraded to 32.0 0 on 24 Jan, the above workaround does not work any more.
I have no idea about the syntax of the filters for Modify HTTP Response ... is there some version number (of the discourse filter ?) to be modified ?
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 933
Joined: 2021-01-26, 11:18

Re: again https://forum.italia.it/

Unread post by Kris_88 » 2023-01-29, 19:38

The site has been updated ...
The reason is not in the browser.

Code: Select all

[["forum.italia.it",["/browser-detect-/",["/.*/g",""]],["/vendor-/",["t.discourse.hoisted??={}","t.discourse.hoisted??(t.discourse.hoisted={})","n??=[]","n||(n=[])","t[e]??=[]","t[e]??(t[e]=[])","r||={}","r||(r={})"]],["/discourse-/",["e.draft||=t.draft","e.draft||(e.draft=t.draft)","n||={}","n||(n={})","f[e]??=[]","f[e]??(f[e]=[])","t.__registry__._typeInjections.service??=[]","t.__registry__._typeInjections.service??(t.__registry__._typeInjections.service=[])"]]]]

Lucio Chiappetti
Astronaut
Astronaut
Posts: 654
Joined: 2014-09-01, 15:11
Location: Milan Italy

Re: again https://forum.italia.it/

Unread post by Lucio Chiappetti » 2023-01-29, 20:54

Kris_88 wrote:
2023-01-29, 19:38
The site has been updated ...
I suspected, but the syntax of the filters remains arabic to me. Would you teach me how to write them in the future.
Anyhow I get access now, many thanks
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

User avatar
adoxa
Fanatic
Fanatic
Posts: 154
Joined: 2019-03-16, 13:26

Re: again https://forum.italia.it/

Unread post by adoxa » 2023-01-29, 23:55

The filter itself is not very friendly, but the Filters Editor is better. The problem is that PM (& Basilisk) don't yet support ??= or ||=, which the filters replace with something that is supported. To DIY means viewing the Javascript, searching for each of those operators, then adding/updating the search/replace patterns. You need to search for the entire statement (e.g. t.discourse.hoisted??={}) and replace it with the more expansive equivalent (e.g. t.discourse.hoisted??(t.discourse.hoisted={})). However, I came across another problem, where using ?? still didn't work, I had to use || instead.

Locked