Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't read docs with multiple tabs #2646

Open
amirbabaeii opened this issue Dec 12, 2024 · 1 comment
Open

Can't read docs with multiple tabs #2646

amirbabaeii opened this issue Dec 12, 2024 · 1 comment

Comments

@amirbabaeii
Copy link

Can't read docs with multiple tabs.

Environment details

  • OS: linux
  • PHP version: 8.3
  • Package name and version: google/apiclient:2.18

Steps to reproduce

  1. create a multiple tab google doc. like this one:
    image

  2. run the code in code example with your documentID.

Code example

        $client = new Client();
        $service_file = storage_path('google-credentials.json');
        $client->setAuthConfig($service_file);
        $client->setScopes([\Google\Service\Docs::DRIVE, \Google\Service\Docs::DOCUMENTS]);

        $doc_service = new \Google\Service\Docs($client);


        dd($doc_service->documents->get($documentId)->getTabs()); // it returns null

Thanks!

@bshaffer
Copy link
Contributor

Can you confirm that the document retrieved by $doc_service->documents->get($documentId) looks as expected other for the lack of tabs?

If so, then there may be an API bug. The next step would be to make the call using the APIs explorer and seeing if tabs is coming back as expected. If so, then it may be an issue with the library. If not then it's an issue with the call you're making, or with the API service itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants