Problem/Motivation
It seems I was a bit careless when testing #3534874: Replace jQuery by vanilla JS (I probably forgot to flush the JS cache), and did not realize the obvious problem that the browser will block the GET request from going out since HTTP strictly forbids a GET request to have a body. Now NO ad will render AT ALL... Instead, we need to use query parameters.
Steps to reproduce
Proposed resolution
I will quickly implement the solution to the problem here (that will not require many changes).
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork ad-3544592
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
lrwebks commentedComment #4
lrwebks commentedWorks again, at least for me!
Comment #5
lrwebks commented@anybody and I are currently working on a fix that does not change the interface of the GET request too much, if at all.
Comment #6
lrwebks commented@anybody: Do you remember what we wanted to change here? I understand that we do not want to change the GET request with query parameters, but I currently don't see any other way to provide all those specifications for what we want to the controller.
Comment #7
anybody@lrwebks as of https://stackoverflow.com/questions/978061/http-get-with-request-body I think the implementation might be correct. Does it work and do we have a tests now to check that it works? (We didn't see it broke before, right?)
Comment #8
lrwebks commentedCurrently, 11.x-dev is broken because of this problem, but the current solution in here is working correctly. We currently don't have any tests in place *at all* for this module. Should we implement one for this here?
Comment #9
anybodyWould be a good thing maybe for AI? What do you think @grevil? (Please review and then let's decide to merge this and create a separate issue for (ai generated) tests.
Comment #10
grevil commentedLooks good! I'll create the tests here.
Comment #11
grevil commentedAdded tests. Although, one will fail, because of #3534872: JS advertisement type does not yet actually run the JS.
Not really worth it using AI to generate the tests. Took too many manual adjustments and therefore too much time...
Might need a better prompt.
Comment #12
anybody@grevil can you put that test into #3534872: JS advertisement type does not yet actually run the JS then please?
Comment #13
grevil commentedAlso, there were no specific tests for this issue added... but I really don't wanna waste more time here. Please review.
Comment #14
grevil commentedOk, done.
Comment #15
anybodyThanks all! Merged!
Comment #16
anybodyComment #19
grevil commentedCreated a new release: https://www.drupal.org/project/ad/releases/11.0.0-alpha6.