I tried using JS Callback with the time spent module but it looks like it's not working as I'm getting 400 error which I posted here https://www.drupal.org/project/time_spent/issues/2939419#comment-12449600

Can somebody advise please, if the below re-writing is correct behaviour or perhaps indication of being the issue?

init rewrite engine with requested uri /js/time_spent/ajax/17/wb8F8hcJdJZJH_l5jYX6XGGgM94b42CpUA9wEPOK_60
applying pattern '^(.*)$' to uri '/js/time_spent/ajax/17/wb8F8hcJdJZJH_l5jYX6XGGgM94b42CpUA9wEPOK_60'
RewriteCond: input='/js/time_spent/ajax/17/wb8F8hcJdJZJH_l5jYX6XGGgM94b42CpUA9wEPOK_60' pattern='^\\/(?:[a-z]{2}(?:-[A-Za-z]{2,4})?\\/)?(?:js|js\\/.*)$' => matched
rewrite '/js/time_spent/ajax/17/wb8F8hcJdJZJH_l5jYX6XGGgM94b42CpUA9wEPOK_60' -> 'js.php?q=/js/time_spent/ajax/17/wb8F8hcJdJZJH_l5jYX6XGGgM94b42CpUA9wEPOK_60'
split uri=js.php?q=/js/time_spent/ajax/17/wb8F8hcJdJZJH_l5jYX6XGGgM94b42CpUA9wEPOK_60 -> uri=js.php, args=q=/js/time_spent/ajax/17/wb8F8hcJdJZJH_l5jYX6XGGgM94b42CpUA9wEPOK_60&js=1
mod_rewrite.c(476): [client 192.168.101.71:57429] 192.168.101.71 - - [drupalserver/sid#7fea923b3e60][rid#7fea922b20a0/initial] local path result: js.php

Comments

markusd1984 created an issue. See original summary.

markhalliwell’s picture

Status: Active » Closed (works as designed)
Related issues: +#2939419: JS callback re-write working?

According to the above rewrite log:

rewrite '/js/time_spent/ajax/17/wb8F8hcJdJZJH_l5jYX6XGGgM94b42CpUA9wEPOK_60' -> 'js.php?q=/js/time_spent/ajax/17/wb8F8hcJdJZJH_l5jYX6XGGgM94b42CpUA9wEPOK_60'

Yes, the rewrite is working correctly. Any issues you're running into is with the module's implementation.

Closing due to duplicate issue there.