Blog-plugin: Syntax Issue (Update Pending, No Update?)

Created on 28 Sep 2020  路  18Comments  路  Source: rainlab/blog-plugin

Good Morning!

Running the blog.Rainlab component on OctoberCMS, and today I have been seeing this error multiple times:

A syntax error was detected in /home/{SITE}/public_html/modules/cms/controllers/index/config_partial_list.yaml.   

file_put_contents(/home/{SITE}/public_html/storage/framework/cache/96/5c/965cdf4c5622f9dd79554e0447a8055106ed0305): 

failed to open stream: No such file or directory at line 45 (near "/home/{SITE}/public_html/vendor/october/rain/src/Parse/Yaml.php")

I'm not sure what the file is supposed to look like, but the [...]/96/ directory is empty, so of course there is no file (with that long hash).

Is there a way to rebuild the file that should be there? I am also unable to get into the CMS panel, but I can get into the Blog and Media panels.

OctoberCMS system log is unavailable from the backend GUI, but I have server access if I know what to look for.

Many thanks!

Response Needed Unconfirmed Bug

All 18 comments

What version of October are you using?

For blog.Rainlab == 1.4.3
For October == Build 469

I'm still very much learning how October works, too, so entirely likely that the issue is BCAK.

@Cameron-Cn does storage/framework/cache/ exist and is it writable by the application?

What's happening is https://github.com/octobercms/library/blob/develop/src/Parse/Yaml.php#L38-L40 is trying to cache the results of modules/cms/controllers/index/config_partial_list.yaml, but the Cache driver is unable to write to the path specified in the error message.

@LukeTowers storage/framework/cache/ exists, and is showing 7 7 5 on permissions, which I would hope includes the application as either User or Group.

The file in question cache/96/5c/{string} has file permissions 6 4 4

It's possible it got caught rebuilding cache for some reason, but I'm unsure why it would have had this issue--it seems to be affecting Media storage, returning a 403 error on a users' recent photos.

@Cameron-Cn double check the user and group and what the application is running under. It shouldn't get "caught rebuilding the cache" there is no dedicated task for rebuilding the cache.

@LukeTowers
Are file permissions hosted somewhere within October documentation? I'll keep looking through past tickets, but a nudge in the right direction would be incredibly helpful!

I'll poke about and look through the stacks, and post here once I can figure out what went wrong.

What it boils down to is the application server user needs read access to everything in the project and write access to everything under storage, plugins, modules, & themes.

Times like these make me realize how much more a user than an admin I am with things still--PHP and October in this case.

At least the front end seems entirely fine, and backend is mostly working as intended.

Thank you for your help!

No problem, being involved with tech means always learning :) I'm still learning new things all the time. Is everything working for you now?

Not working yet. Or rather, still getting errors. Thankfully it's a simple personal site--nothing important.

It still looks like a permissions error, a lot of backend processes are unable to create folders. I'll get some IRL help today or tomorrow, as the stacktrace is way above my head.

Learning is great! If only it didn't involve breaking things all the time...

The stack trace isn't that helpful, because it's saying that there is a YAML parsing error, simply because that's where it first encounters the problem, but it's actually a permissions error that's getting eaten by the YAML parsing and rethrown as if it was a YAML parsing error.

@bennothommo could you adjust that catch block to be more specific about the exceptions it catches so that we can be more sure that it actually is a YAML parsing error before rethrowing it?

How would you recommend changing permissions? I have SSH/Terminal access, but am unfamiliar with what I should look for/search on StackExchange.

Many thanks again1

First thing you need to determine is what user the server is running under, then you can figure out what you need to do with the files. If you want you can hit me up on Discord so I can walk you through it with you sharing your screen.

@LukeTowers
Thank you for the offer--a friend walked me through actually with that exact method! Permissions have been changed, and I have not gotten any errors since...I hesitate to say problem solved, because there is always something!

At least I've gained more sense of what I don't know yet by working through this. This has been a great technical foray for me.

Action
I changed the values on Cache to allow group editing, which may or may not be the safe way to do it. Thankfully, nothing sensitive can be lost.

Result
No more new error logs! The (initial) error log was appearing every few minutes before making permission change.

Above I mentioned 403 errors, I have discovered that was a separate error _on my part_ where I was trying to put a PDF file into the /media directory. Creating a /media/pdf/ subdirectory allowed for display of the PDF.

OctoberCMS forum answer consulted

You should be able to upload PDFs no problem to any directory under media

That is likely an entirely different issue then. I found some forum questions suggesting that permissions errors were somewhat common.

This makes me think it is a permission error with the /media folder or the file uploaded, that was changed when I made a new subdirectory.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rickmills picture rickmills  路  5Comments

silasrm picture silasrm  路  4Comments

Calinou picture Calinou  路  4Comments

willouch picture willouch  路  7Comments

mateoprifti picture mateoprifti  路  3Comments