Due to #1859452: Dialog loads default theme CSS breaking admin theme. we're now 'emulating' what is a normal AJAX system request to ensure that the same theme as the parent page is used in the dialog. Really we should attempt to convert the link clicking and the dialog replacement to the ajax system if possible.

Comments

DamienMcKenna’s picture

Dave Reid’s picture

Nope

hussainweb’s picture

As far as I can see, we are already using the core's AJAX system to load the dialog in 8.x-1.x. Is this issue for 7.x or am I missing something?

Berdir’s picture

We are. But I'm not sure if the problems mentioned in the issue summary/related issue are really resolved now, possibly not. Would be good to confirm.

I didn't see anything break, but would be good to check what kind of additional libraries are loaded when opening the token browser. I guess it will be from the default theme. If that is the case, maybe we can solve it by passing along the theme as a GET argument and implement a theme negotiator to use that theme on that page?

Berdir’s picture

Just seen due to #2640086: Editor routes don't use the ajax_base_page theme negotiator that core has a theme negotiator for ajax requests built in, so it's likely that this just works now. Yay D8. Lets confirm and then close this.

juampynr’s picture

Is there still something to do here?

juampynr’s picture

We are using use-ajax for the token browser link. As far as I know, there is nothing else that we should do to improve this. While reading the documentation, I saw that it is a good practice to have nojs in the path so the server can respond appropriately. However, when I tested it with JavaScript disabled, I did not see a difference.

Shall we close this issue?

Berdir’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev

Yeah, I think we can close this. Or actually, move back to 7.x.