Commit 99066fb2 authored by Vincent Pelletier's avatar Vincent Pelletier
Browse files

all: Ignore language when checking if URL is prefixed by WebSite's url

Otherwise
  https://example.com/foo
would match
  https://example.com/
but not the language-selector
  https://example.com/en/
parent b70c1c62
Pipeline #36953 failed with stage
in 0 seconds
  • I think we have failures like https://erp5js.nexedi.net/#/test_result_module/20240923-13084D824/315 because getOriginalDocument is not defined on ERP5Site, so when logged_in is called on the context of portal object, this fails.

    With 5820860d test would pass, but I'm not sure if it's the best fix.

  • Oh, nice catch, thanks.

    IMHO the best fix is to get ERP5Site to inherit from Base (and possibly more, so it becomes a more normal document - like being able to call activate on it). I expect bootstrap to be possible given how portal_types is a portal-typed document itself, for example. But in the meantime I think your proposed commit should be the best. Could you push it to master please ?

  • Thanks, yes also I have the same feeling that ERP5Site should inherit from Base. Every time we changed class hierarchy it was more complex than what I expected, so for now pushing this fix is enough but it's something we should try one day.

Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment