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 constant "X\DS" #10

Open
MaluNoPeleke opened this issue Jan 31, 2024 · 4 comments
Open

Undefined constant "X\DS" #10

MaluNoPeleke opened this issue Jan 31, 2024 · 4 comments

Comments

@MaluNoPeleke
Copy link

MaluNoPeleke commented Jan 31, 2024

After upgrading to Kirby 4 I have a problem with the Kirby3-Instagram Plugin by @genxbe:

Error: Undefined constant "X\DS" in /var/www/virtual/peleke7/peleke.de/site/plugins/kirby3-instagram/classes/Instagram.php:17
Stack trace:
#0 /var/www/virtual/peleke7/peleke.de/site/plugins/kirby3-instagram/fetch.php(27): X\Instagram->__construct()
#1 {main}
Error: Undefined constant "X\DS" in file /var/www/virtual/peleke7/peleke.de/site/plugins/kirby3-instagram/classes/Instagram.php on line 17
Stack trace:
  1. Error->() /var/www/virtual/peleke7/peleke.de/site/plugins/kirby3-instagram/classes/Instagram.php:17
  2. X\Instagram->__construct() /var/www/virtual/peleke7/peleke.de/site/plugins/kirby3-instagram/fetch.php:27

image

How to solve it?

@MaluNoPeleke
Copy link
Author

Fix: #11
Thanks to @textnixe

@MaluNoPeleke
Copy link
Author

Follow up error

Whoops\Exception\ErrorException: Undefined array key "media" in /var/www/virtual/peleke7/peleke.de/site/plugins/kirby3-instagram/classes/Instagram.php:149
Stack trace:
#0 /var/www/virtual/peleke7/peleke.de/site/plugins/kirby3-instagram/classes/Instagram.php(149): Whoops\Run->handleError(2, 'Undefined array...', '/var/www/virtua...', 149)
#1 /var/www/virtual/peleke7/peleke.de/site/plugins/kirby3-instagram/fetch.php(27): X\Instagram->fetch()
#2 {main}
Whoops\Exception\ErrorException: Undefined array key "media" in file /var/www/virtual/peleke7/peleke.de/site/plugins/kirby3-instagram/classes/Instagram.php on line 149
Stack trace:

  1. Whoops\Exception\ErrorException->() /var/www/virtual/peleke7/peleke.de/site/plugins/kirby3-instagram/classes/Instagram.php:149
  2. Whoops\Run->handleError() /var/www/virtual/peleke7/peleke.de/site/plugins/kirby3-instagram/classes/Instagram.php:149
  3. X\Instagram->fetch() /var/www/virtual/peleke7/peleke.de/site/plugins/kirby3-instagram/fetch.php:27

@andykamezou
Copy link

Fix: #11 Thanks to @textnixe

Your fix works.
But you need to check line 140 & 153. I guess you tried to replace all "DS", so "fields" become "fielDIRECTORY_SEPARATOR" which might cause the follow-up error that you get.

@MaluNoPeleke
Copy link
Author

Thanks, I fixed that in the last commit.

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