-
Notifications
You must be signed in to change notification settings - Fork 576
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
All local asset urls broken #6
Comments
This issue is probably happening because you have the hot file in your public folder (located here This file is created when running |
I've checked and there is no |
I setup twill in my homestead box last night and had similar problems...
I followed all installation and configuration instructions in the website. Updated my npm version to 6.1.0 before running Oh, btw... looking forward to test twill. Looks like a very promising product / platform. Good job! |
Hmm. Having similar issues. All Did these steps;
Edit; |
Hi everyone! First, thanks for trying out Twill 👍 To clear up any misconceptions, Twill is not a theme based CMS like Wordpress for example. This is a package for Laravel developers to rapidly create a custom admin console. It doesn't make any frontend assumptions and as such doesn't setup anything particular for the frontend part of the application you are building. It's on you to set this up like you would in any other Laravel application. That's why going to This is where Twill comes in. It can help you setting up your models and create an admin console on top of those (by helping you with database migrations, controllers, views, configuration and so on). Flexibility comes with responsibility though. You have to setup the CMS navigation yourself, you have to specify where logged in users should be redirected (unless you enable the dashboard screen which is setup at the root url by default), and so on. There are no default models provided, no posts, no pages, only technical models that are used internally by Twill features and that you are going to relate to your own models using Twill's provided traits. For example, if you need to attach files to a model you created, the Our documentation can definitely be improved to better convey those concepts and we are excited to read everyone's feedback here in order to do so. |
Excellent. So things like the file manager not working is to be expected? Would be great to have an example setup to play around with, just super basic where content blocks and so forth is already set up, together with navigation in the admin and so forth. Much easier than digging into Laravel from scratch. A reference build, if you will. I don't know if the A17 FE Boilerplate is something like this, as it's impossible to register/log in from that link referenced at the end of the docs. |
Hey there @ifox That's great news! From what I could understand, Twill can provide a solid backend foundation for any project. I have a question which I couldn't figure out from the docs and unfortunately didn't have the time to test yet:
Best Regards! |
Now back to the actual technical issues you guys encountered! @sebszocinski Twill is using Laravel Mix behind the scene to compile the CMS assets. Laravel Mix is a wrapper around Webpack, which offers hot module reloading. When you are a contributor of Twill or are working on custom blocks for your CMS, you might want to have this feature enabled so that any change you make to your code is almost immediately available to your browser. This is different from something like Browersync in the sense that it does not simply trigger a page reload, but rather inject your JS/CSS updates directly into the page. To make this work, Laravel Mix is spawning a Webpack development server on So the only way your Twill installation would try to load assets from |
@23d1 the file manager should work if you provide the application with AWS S3 credentials in your
|
@ifox Great, thanks. I think some references to these various setups would be great for us new to Laravel in general to have in the docs. Perhaps a "tutorials" or "examples" section where a very basic backend is built, and then how these hook into the templates for rendering. Unless the idea is to cater more to pure Laravel developers, in which case I totally get it. Anyway, an example setup of a basic CMS and templates would be great... At least for us reverse-engineer learners out here. ;) |
@renanBritz Exactly, it is really about providing a foundation to any project that needs a dedicated admin console. Most people tend to manually put those together using Bootstrap templates and end up dealing with tons of HTML markup and repeated backend code, which become very difficult to maintain in the long run. CRUD modules are actually enhanced Laravel resources. The default CRUD operations are not enough to support all the other features Twill offers on top of regular Laravel models: things like featuring, reordering, publishing and so on. Twill comes with an Artisan command to generate those modules. This is definitely different than the packages you mention which are more using the term module from a file architecture standpoint. As for multi-tenancy, definitely. You can serve multiple websites from a single Twill instance, using Laravel's subdomain routing. Correct me if that's not what you meant by multi-tenancy here! |
@23d1 Definitely! We are actually working on a sandbox environment that we are hoping to share as soon as possible. Same for docs, we can definitely see how they are really targeted at pure Laravel developers right now, but we are eager to improve them in order for Twill to become more accessible to any developer! |
Hi @ifox I'm a bit confused. There are many predefined routes and they're naming suggest that there are some basic pages set up.
Followed all install instructions. Also tried the I don't know where to get started. Regards! |
Hi @renanBritz! There are definitely some CMS pages set up depending on the enabled features. By default, the login, password reset and user management section as well as the media library should be available to you after installing. However, there are no CMS "homepage" until you enable the dashboard (for which more documentation is coming asap) or set up a redirect from "/" to a section you added yourself in the In your case, the login screen is failing because of an issue with the CMS assets build. Twill uses Laravel Mix behind the scene to build. DId the As for the Hope that helps! |
I got the same error message ( manifest not found... ), based on this issue, i started some researching... The "problem" is, that the command:
copies the files into Changing it to the following solves the problem:
|
Hi @noxify, interesting! Which OS are you running the NPM script on? I'm thinking it could be a different |
Hi @ifox, my host system is OSX but i have tested it via homestead. Homestead: 7.3.0 Maybe I should update my homestead?! 🤔 |
Ha! I don't think updating Homestead would help as it's a pretty recent one that you have there already. I will run some more tests as this should really be working everywhere, it's just about copying the content of If you don't mind, can you try from your OSX host? |
@ifox sure - i have to check my local env (php version etc.) Btw. here my STRs from my latest test: https://gist.github.com/noxify/66f9b915bcca0ea62f8edb097eb81e3f Maybe it helps to reproduce it. I was also able to reproduce #14 |
Another question: |
@noxify thanks, really helpful! You should only make sure to have NPM > 5.7.8 locally to test the What do you mean by assets? The uncompiled Vue.js components in Twill's I don't think we want to publish those into host apps as this would mean that developers would have to re-publish after each Twill update before recompiling (because your own custom blocks actually end up compiled into the admin build). Also we think that extendability and flexibility is provided as the PHP level. If all the frontend components are published into host apps, developers will tend to modify them, which will make future updates more difficult to them. We're currently looking into ways for developers to extend our Vue components though! So the idea right now is that everything is happening from the vendor folder and the compiled assets are being copied over to your app public folder. You can choose to put those in version control or not. If not, you should have your deploy script run the NPM build command (our recommendation to avoid large repositories as the build is quite large and changes quite often). Hope that makes sense! Eager to hear what you think about it. |
@ifox - thanks for this explaination. Yes it makes sense ;) Btw. I tried it on my local maschine with As database, i used my vagrant maschine (changed the mysql port (now: 33060) + database name (now: twill_local) in my
The |
@ifox - I have updated npm to Test with vagrant:
Test with OSX:
I tested the
Hope that helps :) EDIT: that the error occours is ok for me - It was just a test (for me). |
@ifox I believe it should be stated in the requirements the minimum version of npm needed for usage with Twill. However, I'm experiencing the duplicate public problem described here. I know you are looking into this, and I'll keep manually copying the files over if necessary, but do you have a quickfix I can apply for the time being? Oh, I'm running Laradock v7.0 on Docker over Hyper-V in Windows. |
@hineios yup, we are working on the docs updates. Just cleaning things up a bit and I'm going to open source them next week so it'll be easier to improve them as a community. For the duplicate public problem, we found out that the cp command specified in our npm scripts is not environment agnostic. You can replace the following in your project's
by: "cms-build": "npm run cms-copy-blocks && cd vendor/area17/twill && npm ci && npm run prod && cp -R public/* ${INIT_CWD}/public", Notice the subtle difference, you need to add a
It also applies to the cms-dev scripts. |
Hi everyone, Thank you so much for your feedback here. Twill 1.2 is now released with tons of updates to our documentation as well as to the installation process to make it easier for everyone to troubleshoot. |
+1 Running into a similar problem with both the failing migration scripts to the missing assets due to the hot. I removed the hot files from all public directory but still encountering the issue. Can I resort back to the regular mix |
Trying to demo this on Valet and i've defined my
APP_URL
as well as theADMIN_APP_URL
and I finally managed to log in but none of the styles/js assets are loading because they are referencinglocalhost:8080
and nottwill.test
like i've defined...Looks like a promising product but the docs and setup process could be well improved.
The text was updated successfully, but these errors were encountered: