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

E_PARSE - syntax error, unexpected end of file, expecting ']' while trying to open admin page #1863

Closed
setu4993 opened this issue Feb 8, 2018 · 5 comments

Comments

@setu4993
Copy link

setu4993 commented Feb 8, 2018

Hi,

I accidentally deleted the landing blog page of my installation, and since then the admin page is inaccessible. I have retrieved the deleted pages into their correct folder structure and the website loads fine now, but I am still not sure why the admin page doesn't open.

Trying to open the admin page says:
Server Error Sorry, something went terribly wrong! E_PARSE - syntax error, unexpected end of file, expecting ']' For further details please review your logs/ folder, or enable displaying of errors in your system configuration.
And the log says:
[2018-02-08 02:08:31] grav.CRITICAL: syntax error, unexpected end of file, expecting ']' - Trace: #0 /micro/vendor/filp/whoops/src/Whoops/Run.php(383): Whoops\Run->handleError(4, 'syntax error, u...', 3785) #1 /micro/system/src/Grav/Common/Errors/SystemFacade.php(36): Whoops\Run->handleShutdown() #2 [internal function]: Grav\Common\Errors\SystemFacade->handleShutdown() #3 {main} [] []
(I have retracted the folder structure from the log since it is running on an open website.)

Any help is appreciated. Thanks.

@setu4993
Copy link
Author

setu4993 commented Feb 8, 2018

So, I looked at the error_log created by the server, and turns out one of the *.yaml.php files under /cache/config was incomplete. I renamed that file, and tried opening the admin page again, and it worked.

However, I still am not sure what caused the file to be created in such a way. Keeping the issue open so that the error can be fixed.

@rhukster
Copy link
Member

Strange one, i've never seen that error. If you can give me some exact steps to reproduce, I can see about addressing it.

@setu4993
Copy link
Author

  1. Open the landing 'blog' page of the installation to edit it.
  2. Delete it with the 'x' sign on top.

That is when the website and the admin pages stopped loading with the above error.

@rhukster
Copy link
Member

rhukster commented Feb 19, 2018

I was able to delete the page ok..

Even though it warned me about the hazards of deleting the current 'home' page, i confirmed and it deleted it. Admin didn't break, but simply showed me no pages.

Frontend didn't break either, just showed me a 404 as expected.

@setu4993
Copy link
Author

I see. That's different from what happened to me.

I had an 'About' page that was 01, and the 'Blog' page that was '00' with items under the 'Blog' page. I am running Lingonberry, if that helps.

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

No branches or pull requests

2 participants