Sylius themes not showing on channels - sylius

I have followed the steps to create themes according to Sylius doc.
After run php bin/console sylius:theme:assets:install, login to backend, but no theme showing under channel.
Any ideas? Thanks!

I have found out the reason. Some how the clear cache default on dev environment but actually I only have prod environment.
After cleared cache on prod:
php bin/console --env=prod --no-debug cache:clear
the theme showing up.
Also, since I cannot find how to setup dev env, I have cloned the prod db to sylius_dev and run:
http://[my ip]/app_dev.php
If you are not using 127.0.0.1, you need to add to:
\web\app_dev.php
Hope this help for someone new to Sylius and Symphony like me.

Related

Docusaurus: npm run serve reloaded page not rendered

I have a docosaurus page running. It works fine. I use
'npm run build'
and
'npm run serve'
to deploy it. The app runs fine, but when I go to any page that is not on root and I refresh it, I get:
Index of build/ Quick Intro/ quick1.2/
instead of the rendered page.
Any idea what to do?
This appears to be a bug in old versions of Docusaurus v2. If you look at the screenshots in the following bug report and PR, they show the same "Index of build/..." page:
Bug Report: https://github.com/facebook/docusaurus/issues/6699
Fixed by PR: https://github.com/facebook/docusaurus/pull/6701
I had the same issue when using Docusaurus v2.0.0-beta.15 and upgrading to Docusaurus v2.0.0-beta.17 fixed it.
According to the CHANGELOG.md, it should also be fixed in v2.0.0-beta.16:
2.0.0-beta.16 (2022-02-25)
...
🐛 Bug Fix
...
docusaurus
#6701 fix(cli): disable directory listing in serve (#Josh-Cena)
Source: Docusaurus/CHANGELOG.md

Missing config.json stencil CLI

I'm trying to do some work for a client, but cannot get their bigcommerce site running locally. I have installed stencil CLI (v3.1.1) and downloaded the theme from the bigcommerce dashboard (all files). from the root of the theme i ran "stencil init", then "npm i" and "stencil start".
when i run stencil start, it throws an error saying there's no config.json file.
this is the error i get
How do i generate the config.json file?
The only config file I see is config.stencil.json.
I have also tried running "stencil pull" in hopes that it would pull the config, but it throws another error: "not ok -- Error: Could not fetch active theme details for channel 1: Request failed with status code 404"
Stencil-cli version:
3.1.1
Node version:
12
NPM version:
6.14.15
OS:
mac big sur
Stencil 3.1.1 has been deprecated for some time now. I believe the current version is 3.8. As of 4 months ago, anything below 3.5 will not run (https://developer.bigcommerce.com/changelog#publications/required-stencil-cli-version-set-to-3-5-0).
If you don't have a config.json file in your project, you will need to get the one from the client's store. Try downloading their theme again. It should come through.
Edit: It is possibly the case that you need a new API token. Try making a new one for your store. Make sure the following scopes are set:
Themes: Modify
Settings & Information: Modify
Sites & Routes: Read-only (or Modify)
Documentation for creating a new API account: https://support.bigcommerce.com/s/article/Store-API-Accounts#creating

Spartacus running dev:ssr on multisite not passing requestOrigin from the NgExpressEngineDecorator

I'm running a Spartacus SSR Multisite.
This works fine when I'm running yarn build:ssr and yarn serve:ssr.
The Spartacus NgExpressEngineDecorator nicely passes the original hostname to the application.
But when I run yarn dev:ssr for debugging purposes, this fails.
The SERVER_REQUEST_ORIGIN always returns localhost or 127.0.0.1.
https://github.com/SAP/spartacus/blob/develop/core-libs/setup/ssr/engine-decorator/ng-express-engine-decorator.ts#L108
So the baseSite can't be found.
Setting "host" and "publicHost" options on the "serve-ssr" in angular.json doesn't seem to help either. Any ideas how we can solve this issue?
If I have a decent way to debug the multisite SSR, I'd be very happy.
As #Krzysztof Platis mentioned, putting server.set('trust proxy', 'loopback'); in server.ts is what solved my problem

How to create an aurelia 1.0 app that can be deployed at any root location

I am trying to work out how to deploy an aurelia app, it runs in development with au run. but I need to deploy it into a path which is not the root of the web-site. ie at '/site' not '/'
when I deploy I get an exception from the router: ERROR [app-router] Error: Route not found: /site/
I think it may be that I need to specify a baseURL in one or more places?
but can't see how I can:
make it work in the development environment at /
make it work in the deployed environment at /[any-site-path]
avoid building in knowledge of '/[any-site-path]' to my development environment or bundles, as the path wont be known until someone comes to deploy the code?
i found this question but that seems to apply to an out of date version of the code.
I am using Aurelia 1.0 and building using the au-cli
Any pointers would be useful.
Looks like this is a bug that has been fixed in a more recent version.
I have just gone through and applied the latest versions of:
"aurelia-bootstrapper": "^1.0.0" -> "^2.1.1"
"aurelia-cli": "^0.24.0" -> "^0.26.1"
"aurelia-tools": "^0.2.2" -> "^1.0.0"
And i can now deploy my application to a site sub folder without specifying any url content in the code or html files!
So I can satisfy all 3 of the criteria in my question.
Note the aurelia-cli update (0.25.0) requires a change to the main.(ts/js) as mentioned in the release notes.

keystone projet not getting updated while code changes

I'm new to keystone.js, but not new in the node and js framework world.
I installed keystone with the generator, I can run it with gulp or node keystone , in both cases the site is available on 3000, but updating js files in /routes or /models won't change anything until I re-run gulp or node... is that normal ?
I also ensured that I was in development mode with set NODE_ENV='development'
This has nothing to do with KeystoneJS.
By default neither gulp or node monitor for code changes.
If you want to monitor for code changes from within your gulp setup have a look at gulp-watch.
Otherwise, you can just use nodemon like so: nodemon keystone.js