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

Undefined array key in SearchablePageReferenceProvider #1167

Closed
juliusknorr opened this issue Mar 18, 2024 · 2 comments · Fixed by #1169
Closed

Undefined array key in SearchablePageReferenceProvider #1167

juliusknorr opened this issue Mar 18, 2024 · 2 comments · Fixed by #1169
Assignees
Labels
bug Something isn't working

Comments

@juliusknorr
Copy link
Member

We see some errors on our instance that all seem to originate from resolving an URL like:

/apps/collectives/Nextcloud%20Handbook/Marketing/Events/null

  "url": "/ocs/v2.php/references/resolve?reference=https%3A%2F%2Fcloud.example.com%2Fapps%2Fcollectives%2FNextcloud%2520Handbook%2FMarketing%2FEvents%2Fnull",

Errors:

│[error] 2024-03-14T22:37:15.000 PHP              Undefined array key "fileId" at /var/www/nextcloud/apps/collectives/lib/Reference/SearchablePageReferenceProvider.php#87            │
│[error] 2024-03-14T22:37:15.000 PHP              Undefined array key "extension" at /var/www/nextcloud/apps/collectives/lib/Reference/SearchablePageReferenceProvider.php#94         │
│[error] 2024-03-14T22:37:15.000 PHP              Undefined array key "fileId" at /var/www/nextcloud/apps/collectives/lib/Reference/SearchablePageReferenceProvider.php#87            │
│[error] 2024-03-14T22:37:15.000 PHP              Undefined variable $page at /var/www/nextcloud/apps/collectives/lib/Reference/SearchablePageReferenceProvider.php#109               │
│[error] 2024-03-14T22:37:15.000 PHP              Undefined array key "extension" at /var/www/nextcloud/apps/collectives/lib/Reference/SearchablePageReferenceProvider.php#94         │
│[error] 2024-03-14T22:37:16.000 PHP              Undefined variable $page at /var/www/nextcloud/apps/collectives/lib/Reference/SearchablePageReferenceProvider.php#109               │
│[error] 2024-03-14T22:37:20.000 PHP              Undefined array key "fileId" at /var/www/nextcloud/apps/collectives/lib/Reference/SearchablePageReferenceProvider.php#87            │
│[error] 2024-03-14T22:37:20.000 PHP              Undefined array key "fileId" at /var/www/nextcloud/apps/collectives/lib/Reference/SearchablePageReferenceProvider.php#87            │
│[error] 2024-03-14T22:37:20.000 PHP              Undefined array key "extension" at /var/www/nextcloud/apps/collectives/lib/Reference/SearchablePageReferenceProvider.php#94         │
│[error] 2024-03-14T22:37:20.000 PHP              Undefined array key "extension" at /var/www/nextcloud/apps/collectives/lib/Reference/SearchablePageReferenceProvider.php#94         │
│[error] 2024-03-14T22:37:20.000 PHP              Undefined variable $page at /var/www/nextcloud/apps/collectives/lib/Reference/SearchablePageReferenceProvider.php#109               │
│[error] 2024-03-14T22:37:21.000 PHP              Undefined variable $page at /var/www/nextcloud/apps/collectives/lib/Reference/SearchablePageReferenceProvider.php#109 
@juliusknorr juliusknorr added the bug Something isn't working label Mar 18, 2024
@mejo-
Copy link
Member

mejo- commented Mar 18, 2024

So far I fail to understand where these URLs with null as argument for the page come from. I didn't find a local reproducer yet.

@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Office team Mar 18, 2024
@mejo- mejo- moved this from 🧭 Planning evaluation (don't pick) to 📄 To do (~10 entries) in 📝 Office team Mar 18, 2024
@mejo- mejo- self-assigned this Mar 18, 2024
@mejo-
Copy link
Member

mejo- commented Mar 20, 2024

  • Text: Render LinkBubbleView only if href is set
  • Collectives: catch if pathinfo() returns null

@mejo- mejo- moved this from 📄 To do (~10 entries) to 🏗️ In progress in 📝 Office team Mar 20, 2024
mejo- added a commit to nextcloud/text that referenced this issue Mar 20, 2024
This prevents requests to `/resolve?reference=.../null` when a document
gets opened without a link being selected.

Contributes to nextcloud/collectives#1167

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Mar 20, 2024
Fixes: #1167

Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- moved this from 🏗️ In progress to 👀 In review in 📝 Office team Mar 20, 2024
mejo- added a commit to nextcloud/text that referenced this issue Mar 20, 2024
This prevents requests to `/resolve?reference=.../null` when a document
gets opened without a link being selected.

Contributes to nextcloud/collectives#1167

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Mar 21, 2024
Fixes: #1167

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Mar 25, 2024
Fixes: #1167

Signed-off-by: Jonas <jonas@freesources.org>
@github-project-automation github-project-automation bot moved this from 👀 In review to ☑️ Done in 📝 Office team Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants