Code Monkey home page Code Monkey logo

Comments (6)

alexander-schranz avatar alexander-schranz commented on August 22, 2024

Hello @tackerm,

I'm not familiar with vagrant but I would instead of setting another folder in the AbstractKernel I would just symlink the current folder to the new folder you want so no code need to change and you don't have environment specific things.

The error in the linked issue (sulu/sulu-standard#807) is more a memory problem so you need to give your PHP more memory.

Also have a look at this article https://www.sitepoint.com/getting-started-sulu-cms-vagrant-right-way/

from sulu-minimal.

tackerm avatar tackerm commented on August 22, 2024

Hi @alexander-schranz

Thanks a lot for the hint, I actually got it running with symlinks after messing around a bit more with the vagrant provisioners. Nevertheless, changing the path in the AbstractKernel should probably be possible, because it is in the Symfony docs and people coming from Symfony probably expect this to work. Definitely a nice to have, but maybe something to look into some day.

As for the linked issue, I am running on 4 GB. I assume this is more related to filesystem throughput rates - synced folders on vagrant are infamous for being slow...

from sulu-minimal.

alexander-schranz avatar alexander-schranz commented on August 22, 2024

@tackerm the error is really strange I could only think that maybe that the kernel had still the false folder cached. So maybe a rm -rf var/cache and cleaning opcache could had fix it. I recommend the symlink because environment specific checks should when possible be avoided.

EDIT: What I also see now that you did forgot the $this->getContext() folder which is important for the 2 Kernel setup of sulu. So maybe this did also made an error.

from sulu-minimal.

tackerm avatar tackerm commented on August 22, 2024

EDIT: What I also see now that you did forgot the $this->getContext() folder which is important for the 2 Kernel setup of sulu. So maybe this did also made an error.

I quickly checked - adding $this->getContext() to the path makes the error go away!

I find this a bit unexpected though, as the ./bin/console cache:clear only touches the admin context. On a fresh setup with empty cache and untouched website context, I would still expect to be able to define any arbitrary path for the cache directory... UNLESS there is some other restriction for this path hidden somewhere in the code (which would kind of break the purpose of having a single getter method for this path). Anyways, this is maybe a bit an academic discussion now... 😉

from sulu-minimal.

alexander-schranz avatar alexander-schranz commented on August 22, 2024

@tackerm good that it works know. The function is needed by all 3 Kernels (Website, Admin, (Preview)) and every kernel need its own cache directory that they don't overwrite themselves. Defining them on the same directory is like you define 2 different symfony applications using the same cache directory. Maybe a comment should be added in that function so nobody overwrite it without adding the context. Calling the parent function and each kernel add the context part itself is currently not possible as the context is before the environment part and changing that would be a BC Break. For 2.0 there will maybe just be one cache folder needed then this pitfall should not longer happen.

from sulu-minimal.

tackerm avatar tackerm commented on August 22, 2024

Maybe a comment should be added in that function so nobody overwrite it without adding the context

I think that would be good. Maybe a note in the getting started guide would be nice too (changing the cache dir was literally the first thing I did after running composer create-project)

Thanks for the help!

from sulu-minimal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.