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

Render content in process? #41

Open
chillu opened this issue Jul 22, 2019 · 3 comments
Open

Render content in process? #41

chillu opened this issue Jul 22, 2019 · 3 comments

Comments

@chillu
Copy link

chillu commented Jul 22, 2019

The Analysis class runs a HTTP request against the webserver to get the contents in https://github.com/vulcandigital/silverstripe-seo/blob/master/src/Analysis/Analysis.php#L164

I've got a few niggles with this: It isn't very performant (separate framework boot on every save request in CMS?), and it presumably can't read draft content because it's not performed in an authenticated session. So as an author, it appears that you can't get feedback on your draft content before you publish it, which is exactly when you'd want it, right?

Have you considered using Director::test() for this? It runs the request in process, and can account for stage=Stage.

Also, doing this with file_get_contents() isn't best practice - lots of systems have allow_url_fopen turns off for security reasons - it should use a HTTP client like Guzzle.

@zanderwar
Copy link
Contributor

Hi @chillu

Unfortunately (as per readme) this package is pretty much abandoned as I don't have time to manage silverstripe modules anymore.

While I agree with every comment you've mentioned here, in order for them to come to fruition you would need to create a PR.

This was more of a working concept and still in it's infancy, it was never advertised as perfect.

If you know someone that would be willing to take ownership of this module and manage it, i'll happily transfer ownership.

All the best

@chillu
Copy link
Author

chillu commented Jul 23, 2019

Hah, fair enough. Your call if you keep those features discussions here on Github in case it gains traction again, or if you want to close.

@zanderwar
Copy link
Contributor

I'll leave them open as I was never happy with using file_get_contents, it was just the easiest way to get everything at once to parse (given that content can come from anywhere) it also required #16 which was really unsavoury for me

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