Steps to reproduce

When we tried to enable this module it threw an error, The error mentioned below.

Error: Call to undefined method Symfony\Component\HttpFoundation\Request::isMasterRequest() in Drupal\rest_api_access_token\EventSubscriber\CacheEndpointSubscriber->onKernelRequest() (line 98 of modules\contrib\rest_api_access_token\src\EventSubscriber\CacheEndpointSubscriber.php).

Command icon 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

aman_lnwebworks created an issue. See original summary.

aaron.ferris’s picture

I think this is fixed on the 2.x branch, are you using 1.x?

1.x (8.x-1.6)

    if (!$event->isMasterRequest()) {
      return;
    }

2.x (2.0.2)

    if (!$event->isMainRequest()) {
      return;
    }
aman_lnwebworks’s picture

StatusFileSize
new48.02 KB

Hi @aaron.ferris

We are also using 2.x (2.0.2) branch.

I am attaching the screenshot of info file

marcinkazmierski’s picture

Hi @aman_lnwebworks,
are you sure you are using the latest version?

Please look at the current source code:
https://git.drupalcode.org/project/rest_api_access_token/-/blob/2.0.x/src/EventSubscriber/CacheEndpointSubscriber.php

    if (!$event->isMainRequest()) {
      return;
    }
rajan kumar@2026’s picture

Assigned: Unassigned » rajan kumar@2026
rajan kumar@2026’s picture

StatusFileSize
new102.4 KB

Hii, @aman_lnwebworks

i cloned "2.0.x-dev" this branch and enable module i can not get error message as mentioned above attached hare screen shot.

rajan kumar@2026’s picture

Assigned: rajan kumar@2026 » Unassigned