Giter Site home page Giter Site logo

scandipwa / magento-docker Goto Github PK

View Code? Open in Web Editor NEW
105.0 24.0 315.0 3.67 MB

Docker environment dedicated for ScandiPWA theme development

Home Page: https://scandipwa.com/

License: Open Software License 3.0

Dockerfile 17.99% Makefile 1.16% Shell 47.72% PHP 1.62% VCL 31.51%
docker pwa docker-compose-template docker-compose docker-stack magento2

magento-docker's Introduction

ScandiPWA_logo


Codacy Badge Explore documentation Join community Slack

This is a base repository that contains the Docker environment for Magento ^2.3.

Scandipwa-base is a docker environment that is needed for the development of the ScandiPWA theme.

Already installed ScandiPWA? Then go to the scandipwa/base-theme repository to check the latest releases!

What is ScandiPWA?

ScandiPWA is a single page application (SPA) theme for Magento with advanced PWA capabilities.

ScandiPWA is based on React and utilizes GraphQL API of Magento 2.3.

SEE IT IN ACTION โ†’ demo.scandipwa.com

Want to learn more?

See what we have for you:

Your question was not covered? Join our community Slack channel and ask the core team directly!

Docker Setup

The docker environment is prepared to deploy and develop the theme. We recommend using it as:

  • It has pre-configured services
  • No need to have an existing Magento installation
  • Rendertrone out of the box
  • It has a development-friendly setup

NOTE! Currently, the docker setup is supported only for Linux.

Ready to try?

Follow the guide for Docker setup on Linux or watch the video guide.

docker install

Setup on existing Magento

Already have an existing Magento installation?

ScandiPWA is a regular Magento theme. You can install it on the existing Magento instance using composer.

Ready to try?

Follow the guide for setup on existing Magento or watch the video guide.

existing M2 setup

Setup with a remote server

If you are not planning to developer a back-end functionality, but to modify the front-end only, you can try setting up the theme with the remote Magento 2 server.

NOTE! It is impossible to test the website in production mode (of the webpack build). This is the main downside of this approach.

Ready to try?

Follow the guide for setup with remote M2 server.

Modularity

The repository is based on Magento 2.3. All components and modules, except the further theme development must be managed by Composer.

Dependencies

License

FOSSA Status

magento-docker's People

Contributors

alfredsgenkins avatar eli-l avatar fossabot avatar lianastaskevica avatar olegsjakovlevs avatar raivisdejus avatar rataj86 avatar robolv avatar rootindex avatar ybutrameev avatar yeegor avatar zans-laksa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magento-docker's Issues

Vendor errors after upgrade on theme when npm build

Describe the bug
Function pwa_theme_install finish with Exit status 2. The npm run build throw this errors:


ERROR in /var/www/public/vendor/scandipwa/source/src/app/util/Braintree/Braintree.js
    Module not found: Error: Can't resolve 'braintree-web-drop-in' in '/var/www/public/vendor/scandipwa/source/src/app/util/Braintree'


    ERROR in /var/www/public/vendor/scandipwa/source/src/app/component/InjectedStripeCheckoutForm/InjectedStripeCheckoutForm.container.js
    Module not found: Error: Can't resolve 'react-stripe-elements' in '/var/www/public/vendor/scandipwa/source/src/app/component/InjectedStripeCheckoutForm'
    
    ERROR in /var/www/public/vendor/scandipwa/source/src/app/component/InjectedStripeCheckoutForm/InjectedStripeCheckoutForm.component.js
    Module not found: Error: Can't resolve 'react-stripe-elements' in '/var/www/public/vendor/scandipwa/source/src/app/component/InjectedStripeCheckoutForm'
    
    ERROR in /var/www/public/vendor/scandipwa/source/src/app/component/Stripe/Stripe.component.js
    Module not found: Error: Can't resolve 'react-stripe-elements' in '/var/www/public/vendor/scandipwa/source/src/app/component/Stripe'
   
    ERROR in /var/www/public/vendor/scandipwa/source/src/app/component/VideoPopup/VideoPopup.component.js
    Module not found: Error: Can't resolve 'react-vimeo' in '/var/www/public/vendor/scandipwa/source/src/app/component/VideoPopup'
   
    ERROR in /var/www/public/vendor/scandipwa/source/src/app/component/VideoPopup/VideoPopup.component.js
    Module not found: Error: Can't resolve 'react-youtube' in '/var/www/public/vendor/scandipwa/source/src/app/component/VideoPopup'


To Reproduce

  1. Updgrade scandipwa-base
  2. Install pwa theme 2.7

Expected behavior
Install vendors on theme

Filter Issue in PLP Page

  1. After applying Filter in PLP, if we go back to the homepage and come to same category, the filter is not reset. However, on refreshing from the browser the page reloads with total products.
  2. Sometimes header comes empty and delete icon is removed when selecting any filter.
  3. After opening filter, click on any filter > click on delete icon and then if you come back on the category page and close the filter section, youโ€™ll see that the header is not updated. Previously it used to clear selected filters even on the same page.
  4. After click of back button on applying more than one Filter . Pages doesn't go to previous state instead it moves to menu section

Kindly check it and let me know.

Magento 2 automatical bootstrap is failing with latest.sql applied

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Run docker-compose up -d
  2. Import latest.sql
  3. Run docker-compose up -d --force-recreate

Expected behavior
Magento 2 installs/updates without the errors automatically.

Does anyone come across the same Magento application is not installed issues?

Environment: Ubuntu 16.04 LTS
Docker and Docker Compose works well

My steps are below:

1.git clone https://github.com/scandipwa/scandipwa-base.git

2.cd scandipwa-base

  1. run export COMPOSER_AUTH='{"http-basic":{"repo.magento.com": {"username": "REPLACE_THIS", "password": "REPLACE_THIS"}}}' the user name and password is my public key and private key respectively obtained from Magento Marketplace.

  2. make cert

  3. docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml pull

  4. docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml up -d

  5. docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml logs -f app

in step 7, I got the errors as shown in the screenshot:

result

Very appreciated if anyone can give me a guide. Thank you

Update quick-start to have /etc/hosts configuraiton

Is your feature request related to a problem? Please describe.
I am setting up the env, and project does not work!!! I had to edit /etc/hosts!!! PLEASE FIX!!!

Describe the solution you'd like
I should know about /etc/hosts update requirement while reading quick-start.

Theme is not displaying in the BE of Magento

Describe the bug
It is impossible to switch a theme from the backend.
The ScandiPWA or any other bootstrapped theme is not present in none of -

Content -> Configuration
Content -> Theme

To Reproduce
Steps to reproduce the behavior:

  1. Go to Admin;
  2. Content -> Configuration;
  3. Select Default Store View configs, by clicking on Edit;
  4. In the dropdown of themes in the Default Themes section, no ScandiPWA or any other PWA bootstrapped theme.

Expected behavior
To be able to switch the theme from the backend

Screenshots
https://prnt.sc/o3wkz1

Desktop (please complete the following information):

  • It is not important, as it is an M2 internal thing with registration the theme.

Multi language website

I would like to ask if having a multi language website with the ScandiPWA theme is currently supported.

I have managed to generate a translation bundle for each new locale (with npm run extract-translations) and have multiple stores with different languages. But I would like each store to have the magento store code at the url. E.g. scandipwa.local/en/promo and scandipwa.local/fr/promo and the same for categories, products, cms pages etc.. Is this functionality supported by scandiPWA?

Note:

  • I have followed all the necessary steps to create a multi language website in Magento Admin
  • I am running scandipwa with docker production build (not development)

Custom urls of my modules always return 404 with ScandiPWA theme

Hi!

My magento module registers custom url (let's say /marketplace) in /etc/frontend/routes.xml
Everything works fine with default Magento theme.

But after switching to ScandiPWA theme every registered url returns 404 (styled with scandi).
If I switch back to default theme - everything is ok again.

What happens with other modules's urls after enabling ScandiPWA? Where to dig to solve it?

Thanks!

Homepage is blank

Describe the bug
The page is blank sometimes.
Most likely, it happens when the page is opened for the first time during the day.

First was noticed when new styles were deployed.

To Reproduce
No steps to reproduce.
The issue happens randomly.

Expected behavior
The page should never be blank.

Screenshots
Desktop - https://prnt.sc/o3unnm
Mobile - https://prnt.sc/o3urj0

Desktop (please complete the following information):

  • OS: Mac OS 10.14.5
  • Browser Chrome
  • Version 74.0.3729.169

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S10+
  • OS: Android 9
  • Browser Chrome
  • Version 75.0.3770.89

Configurations having Different Price for each Variant Product

Is your feature request related to a problem? Please describe.
When variant products of configurable products have different price then the product card will show just the lowest price when the filter is above the lowest price it shows only the max price of that configurable product.

Describe the solution you'd like
When it shows the lowest price above that in a small light text if it's written as starts from $ XXXX.XX and when it shows the max price as highest at $ XXXX.XX instead of just $ XXXX.XX

Error fetching header or footer & error fetching catalog

Describe the bug
I used your installation guide from the video "Getting started - demo setup"
after running app_1
content is not loaded and writes
there is such an inscription on the main page, for example, in the catalog, such as this, the browser does not have errors

To Reproduce

Steps to reproduce the behavior:
4. See error
ะธะทะพะฑั€ะฐะถะตะฝะธะต
ะธะทะพะฑั€ะฐะถะตะฝะธะต
ะธะทะพะฑั€ะฐะถะตะฝะธะต

Desktop (please complete the following information):

  • OS: linux(ubuntu)18.02

Additional context
how is it
Thanks

Custom product attributes not showing on home page

Describe the bug
after adding new custom attribute to product and set up needed storefront properties for it it still not available on homepage widget - but on I can see it on category view

Category view screen - https://prnt.sc/sf6r0b
Home page screen - https://prnt.sc/sf6rw4

Additional info - for rendering needed attribute on product card I override Product Card component

added this function:
renderYear() {
const { product: { sku }, getAttribute } = this.props;
const { product_list_content: { attribute_to_display } = {} } = window.contentConfiguration;
const gads = getAttribute(attribute_to_display || 'gads') || {};

    if (sku && !gads) return null;

    return (
        <div
            block="ProductCard"
            elem="Year"
            mods={ { isLoaded: !!gads } }
        >
            <ProductAttributeValue
                attribute={ gads }
                isFormattedAsText
            />
        </div>
    );
}

Use Packagist to store

Is your feature request related to a problem? Please describe.
Use packagist for php composer packages

Describe the solution you'd like
Setup and pack project modules in composer packages and store on packagist.org for easier project distribution and updates

Project bootstrap optimization

To make onboarding simple and straightforward as possible, the following things must be done/improved:

  • Works by default with ssl container, check if certs are in place before execution.
  • Database dump applied via wrapper script
  • Media added via wrapper script
  • Additional make bootstrap is added for project creation from scratch
  • Make composer.json out of repository to be able upgrade base code base without conflicts
  • xdebug config is attachable via mount, not bundled inside

Frontend container not working

Describe the bug
When setting up new scandipwa project with docker following the docs.scandipwa.com docs, frontend container is not working and no changes are being shown in frontend, only after restarting containers.

My fix
Adjusted docker-compose.frontend.yml file to this, restarted nginx and varnish and it is working now:

version: '3.6'
services:
nginx:
volumes:
- ./deploy/frontend/conf/nginx/cache-router.conf:/etc/nginx/conf.d/cache-router.conf
links:
- frontend
frontend:
image: scandipwa/frontend:latest
build:
context: build/frontend
args:
- NODEJS_VERSION=${NODEJS_VERSION}
volumes:
- ./src/app/design/frontend/Scandiweb/pwa:/var/www/public/app/design/frontend/Scandiweb/pwa
- ./src/vendor/scandipwa/source:/var/www/public/vendor/scandipwa/source
- ./src/app/code:/var/www/public/app/code
- ./src:/var/www/public
# Uncomment line below only for testing launch script without rebuild
# - ./build/frontend/start.sh:/start.sh
env_file: .env
working_dir: "/var/www/public/app/design/frontend/Scandiweb/pwa/"
command: ["npm", "run", "pm2-watch"]
expose:
- 3003
app:
command: /wait-for-it.sh mysql:3306 -- /start.sh -F

Create a "stable" tag/branch.

Is your feature request related to a problem? Please describe.
Master has latest changes, that might introduce defects.

Describe the solution you'd like
Stable tag or branch that can be used for adopters to setup and skip buggy version.

Varnish soft purge

We could utilize Varnish soft purge for better performance/usability, however Magento does not support that approach out of the box.

TODO
Decide on application implementation

** Varnish config (v5.2+)**

vcl 4.0;

import std;

import purge;
# The minimal Varnish version is 5.0
# For SSL offloading, pass the following header in your proxy server or load balancer: 'X-Forwarded-Proto: https'

backend default {
    .host = "nginx";
    .port = "8090";
    .first_byte_timeout = 600s;
}

acl purgeacl {
    "localhost";
    "172.0.0.0"/8;
    "192.168.0.0/16";
}

sub vcl_recv {
    if (req.method == "PURGE") {
        if (client.ip !~ purgeacl) {
            return (synth(405, "Method not allowed"));
        }
        # To use the X-Pool header for purging varnish during automated deployments, make sure the X-Pool header
        # has been added to the response in your backend server config. This is used, for example, by the
        # capistrano-magento2 gem for purging old content from varnish during it's deploy routine.
        if (!req.http.X-Magento-Tags-Pattern && !req.http.X-Pool) {
            return (hash);
//            return (synth(400, "X-Magento-Tags-Pattern or X-Pool header required"));
        }
        if (req.http.X-Magento-Tags-Pattern) {
          ban("obj.http.X-Magento-Tags ~ " + req.http.X-Magento-Tags-Pattern);
        }
        if (req.http.X-Pool) {
          ban("obj.http.X-Pool ~ " + req.http.X-Pool);
        }
        return (synth(200, "Purged"));
    }

    if (req.method != "GET" &&
        req.method != "HEAD" &&
        req.method != "PUT" &&
        req.method != "POST" &&
        req.method != "TRACE" &&
        req.method != "OPTIONS" &&
        req.method != "DELETE") {
          /* Non-RFC2616 or CONNECT which is weird. */
          return (pipe);
    }

    # We only deal with GET and HEAD by default
    if (req.method != "GET" && req.method != "HEAD") {
        return (pass);
    }

    # Bypass shopping cart, checkout and search requests
    if (req.url ~ "/checkout" || req.url ~ "/catalogsearch") {
        return (pass);
    }

    # Bypass health check requests
    if (req.url ~ "/pub/health_check.php") {
        return (pass);
    }

    # Bypass graphql requests - disable for persisted query
//    if (req.url ~ "/graphql") {
//      return (pass);
//    }

    # Set initial grace period usage status
    set req.http.grace = "none";

    # normalize url in case of leading HTTP scheme and domain
    set req.url = regsub(req.url, "^http[s]?://", "");

    # collect all cookies
    std.collect(req.http.Cookie);

    # Compression filter. See https://www.varnish-cache.org/trac/wiki/FAQ/Compression
    if (req.http.Accept-Encoding) {
        if (req.url ~ "\.(jpg|jpeg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|swf|flv)$") {
            # No point in compressing these
            unset req.http.Accept-Encoding;
        } elsif (req.http.Accept-Encoding ~ "gzip") {
            set req.http.Accept-Encoding = "gzip";
        } elsif (req.http.Accept-Encoding ~ "deflate" && req.http.user-agent !~ "MSIE") {
            set req.http.Accept-Encoding = "deflate";
        } else {
            # unkown algorithm
            unset req.http.Accept-Encoding;
        }
    }

    # Remove Google gclid parameters to minimize the cache objects
    set req.url = regsuball(req.url,"\?gclid=[^&]+$",""); # strips when QS = "?gclid=AAA"
    set req.url = regsuball(req.url,"\?gclid=[^&]+&","?"); # strips when QS = "?gclid=AAA&foo=bar"
    set req.url = regsuball(req.url,"&gclid=[^&]+",""); # strips when QS = "?foo=bar&gclid=AAA" or QS = "?foo=bar&gclid=AAA&bar=baz"

    # Static files caching
    if (req.url ~ "^/(pub/)?(media|static)/") {
        # Static files should not be cached by default
        #return (pass);

        # But if you use a few locales and don't use CDN you can enable caching static files by commenting previous line (#return (pass);) and uncommenting next 3 lines
        unset req.http.Https;
        unset req.http.X-Forwarded-Proto;
        unset req.http.Cookie;
    }

    return (hash);
}

sub vcl_hash {
    if (req.http.cookie ~ "X-Magento-Vary=") {
        hash_data(regsub(req.http.cookie, "^.*?X-Magento-Vary=([^;]+);*.*$", "\1"));
    }

    # For multi site configurations to not cache each other's content
    if (req.http.host) {
        hash_data(req.http.host);
    } else {
        hash_data(server.ip);
    }

    # To make sure http users don't see ssl warning
    if (req.http.X-Forwarded-Proto) {
        hash_data(req.http.X-Forwarded-Proto);
    }

}

sub vcl_backend_response {

    set beresp.grace = 3d;

    if (beresp.http.content-type ~ "text") {
        set beresp.do_esi = true;
    }

    if (bereq.url ~ "\.js$" || beresp.http.content-type ~ "text") {
        set beresp.do_gzip = true;
    }

    if (beresp.http.X-Magento-Debug) {
        set beresp.http.X-Magento-Cache-Control = beresp.http.Cache-Control;
    }

    # cache only successfully responses and 404s
    if (beresp.status != 200 && beresp.status != 404) {
        set beresp.ttl = 0s;
        set beresp.uncacheable = true;
        return (deliver);
    } elsif (beresp.http.Cache-Control ~ "private") {
        set beresp.uncacheable = true;
        set beresp.ttl = 86400s;
        return (deliver);
    }

    # validate if we need to cache it and prevent from setting cookie
    # images, css and js are cacheable by default so we have to remove cookie also
    if (beresp.ttl > 0s && (bereq.method == "GET" || bereq.method == "HEAD")) {
        unset beresp.http.set-cookie;
    }

   # If page is not cacheable then bypass varnish for 2 minutes as Hit-For-Pass
   if (beresp.ttl <= 0s ||
       beresp.http.Surrogate-control ~ "no-store" ||
       (!beresp.http.Surrogate-Control &&
       beresp.http.Cache-Control ~ "no-cache|no-store") ||
       beresp.http.Vary == "*") {
        # Mark as Hit-For-Pass for the next 2 minutes
        set beresp.ttl = 120s;
        set beresp.uncacheable = true;
    }

    return (deliver);
}

sub vcl_deliver {
    if (resp.http.X-Magento-Debug) {
        if (resp.http.x-varnish ~ " ") {
            set resp.http.X-Magento-Cache-Debug = "HIT";
            set resp.http.Grace = req.http.grace;
        } else {
            set resp.http.X-Magento-Cache-Debug = "MISS";
        }
    } else {
        unset resp.http.Age;
    }

    # Not letting browser to cache non-static files.
    if (resp.http.Cache-Control !~ "private" && req.url !~ "^/(pub/)?(media|static)/") {
        set resp.http.Pragma = "no-cache";
        set resp.http.Expires = "-1";
        set resp.http.Cache-Control = "no-store, no-cache, must-revalidate, max-age=0";
    }

    unset resp.http.X-Magento-Debug;
    unset resp.http.X-Magento-Tags;
    unset resp.http.X-Powered-By;
    unset resp.http.Server;
    unset resp.http.X-Varnish;
    unset resp.http.Via;
    unset resp.http.Link;
}

sub custom_purge {
    set req.http.purged = purge.soft(0s, 300s, 300s);
    if (req.http.purged == "0") {
        return (synth(404));
    }
    else {
        return (synth(200));
    }
}

sub vcl_hit {
    if (req.method == "PURGE") {
        call custom_purge;
    }

    if (obj.ttl >= 0s) {
        # Hit within TTL period
        return (deliver);
    }
    if (std.healthy(req.backend_hint)) {
        if (obj.ttl + 300s > 0s) {
            # Hit after TTL expiration, but within grace period
            set req.http.grace = "normal (healthy server)";
            return (deliver);
        } else {
            # Hit after TTL and grace expiration
            return (miss);
        }
    } else {
        # server is not healthy, retrieve from cache
        set req.http.grace = "unlimited (unhealthy server)";
        return (deliver);
    }
}

sub vcl_miss {
    if (req.method == "PURGE") {
        call custom_purge;
    }
}

sub vcl_synth {
    if (req.method == "PURGE") {
        if (req.http.purged) {
            set resp.http.purged = req.http.purged;
        }
        return (deliver);
    }
}```

Certificated trusted issue

Hello,
I can create certificate successfully as per your instruction in document,
And when i make it trusted using following command "trust anchor --store opt/cert/scandipwa-ca.pem" then it shows me "p11-kit: no configured writable location to store anchors"
Then i also apply it for manually as per documentation.
After that all the process got completed and try to open following url "https://scandipwa.local/" the it show me
Screenshot from 2020-04-26 17-16-37
Screenshot from 2020-04-26 17-16-43

Reviews not storing rating in back-end

Describe the bug
Posted reviews do not store the rating given by the user, I don't see the rating in the back-end neither in the front-end.

The rating is sent by the front-end in the request to the back-end, but it's not stored.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a product
  2. Click on 'WRITE A NEW REVIEW'
  3. Fill in all fields and make sure to give ratings
  4. Approve the rating in Magento
  5. You will see 'Rating isn't Available' in Magento and no rating on the front-end

Expected behavior
Ratings given by a user should be stored in Magento and displayed on the front-end.

Additional context
Magento 2.3.3
ScandiPWA "^2.7.2"

change databse

Hello,
I m able to integrate your demo database.
But i dont know how to ad my magento database in your system.
Please help me asap.
Thanks

Configure Elasticsearch

Is your feature request related to a problem? Please describe.
I want to run Elasticsearch. I need a service and settings for it.

Describe the solution you'd like
Implement following features:

  • New service for elastic search

When start docker it throw error

Describe the bug

When I run command:

docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml up -d --force-recreate

docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml logs -f app

It throw error:

Screenshot from 2020-02-06 15-40-16

Thanks

have the theme like https://www.technodom.kz/?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Implement MailDev to test customer account features.

Is your feature request related to a problem? Please describe.
I want to test email features. I would like to see sent emails and the sending of them.

Describe the solution you'd like
Implement MailDev service and configure Magento to send emails.

Scandipwa-docker build varnish error library geoip2

Describe the bug
scandipwa-docker build varnish error lib geoip2

When I run the command:
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml up -d --force-recreate
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml logs varnish

It shows error:
Screenshot from 2020-01-31 10-13-32

How to fix it?

Thanks

Migration script is failing!

Describe the bug
The migration script failed during initial project installation!

To Reproduce
Steps to reproduce the behaviour:

  1. Follow the quick-start instructions to step 5.
  2. Notice it is failing due not finding the media

Expected behavior
The migrations scripts should run as expected.

PDP - Write a review in Mobile

Go to Product detail page. Click on Review Tab and "Write a review". Now using mobile "Back arrow" in device. Its redirecting to PLP Page instead of PDP.

unified interface for plugins

when working with plugins I found that the arguments type & arguments order is different between member-functions, member-property

for member-functions
arg1 is an array
arg2 is callback
arg3 is a proxy object

for member-properties
arg1 is a callback
arg2 is a proxy object

I think all plugins should have the same interface.
*the docs are outdated so I couldn't figure what should array argument passed to member-function should represent but I see it's always empty!

Support Xdebug

Is your feature request related to a problem? Please describe.

  • Add xdebug as pluggable containers, same as application but with debug module
  • Switchable via variable PROJECT_TAG

Host on docker hub

Is your feature request related to a problem? Please describe.

  • Move base images to the hub.docker.com and build there
  • Update docker-compose manifests with new paths to images

Sort By Brand In PLP

Describe the bug
sort by the brand in Product Listing Page i.e., Category is Redirecting to 404

To Reproduce
Steps to reproduce the behavior:

  1. Go to Product Listing Page
  2. Click on click on sort by dropdown
  3. Select the sort by brand, and even attribute size.
  4. Redirects to 404 page

Expected behavior
As per the process, it should show the products sorted by brand name.

Screenshots
screenshot-demo scandipwa com-2020 07 01-12_16_44

Media assets archive is outdated

Describe the bug
The media assets archive (for those who install ScandiPWA demo) is outdated. Folder structure has changed:

  1. there shouldn't be a media folder inside archive cause we extract archive into existing media folder.
  2. there should be webp and svg folders, and catalog folder should be inside these folders.
  3. Some products from last deploy/latest.sql don't have pictures in the archive.
    etc.

Please update media archive with current changes.

Database migration failed: manual action is required!

I am following all the steps from the documentation but the install is breaking at step 5.
When I run the up -d command.
In the logs I receive at Checking status of the magento database point the following:
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Framework\Setup\Declaration\Schema\Db\SchemaBuilder::processReferenceKeys() must be of the type array, null given, called in /var/www/public/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php on line 127 and defined in /var/www/public/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php:137 app_1 | Stack trace: app_1 | #0 /var/www/public/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php(127): Magento\Framework\Setup\Declaration\Schema\Db\SchemaBuilder->processReferenceKeys(NULL, Object(Magento\Framework\Setup\Declaration\Schema\Dto\Schema)) app_1 | #1 /var/www/public/vendor/magento/framework/Setup/Declaration/Schema/SchemaConfig.php(66): Magento\Framework\Setup\Declaration\Schema\Db\SchemaBuilder->build(Object(Magento\Framework\Setup\Declaration\Schema\Dto\Schema)) app_1 | #2 /var/www/public/vendor/magento/framework/Setup/Declaration/Schema/UpToDateDeclarativeSchema.php(56): Magento\Framework\Setup\Declaration\Schema\SchemaConfig->get in /var/www/public/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php on line 137 app_1 | app_1 | PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Framework\Setup\Declaration\Schema\Db\SchemaBuilder::processReferenceKeys() must be of the type array, null given, called in /var/www/public/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php on line 127 and defined in /var/www/public/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php:137 app_1 | Stack trace: app_1 | #0 /var/www/public/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php(127): Magento\Framework\Setup\Declaration\Schema\Db\SchemaBuilder->processReferenceKeys(NULL, Object(Magento\Framework\Setup\Declaration\Schema\Dto\Schema)) app_1 | #1 /var/www/public/vendor/magento/framework/Setup/Declaration/Schema/SchemaConfig.php(66): Magento\Framework\Setup\Declaration\Schema\Db\SchemaBuilder->build(Object(Magento\Framework\Setup\Declaration\Schema\Dto\Schema)) app_1 | #2 /var/www/public/vendor/magento/framework/Setup/Declaration/Schema/UpToDateDeclarativeSchema.php(56): Magento\Framework\Setup\Declaration\Schema\SchemaConfig->get in /var/www/public/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php on line 137 app_1 | DB STATUS: 255 app_1 | Database migration failed: manual action is required!

To Reproduce
Install scandipwa following the docs from github.

Expected behavior
Make the install work.

Desktop (please complete the following information):

  • OS: [Ubuntu 18.04 LTS]

Error when docker start frontend environment

Describe the bug
When I run command:
docker-compose -f docker-compose.yml -f docker-compose.ssl.yml -f docker-compose.frontend.yml up -d

docker-compose -f docker-compose.yml -f docker-compose.ssl.yml -f docker-compose.frontend.yml logs -f frontend

Response is:
Screenshot from 2020-02-04 17-47-05

Catalog URL

Describe the bug
Catalog URL are different from native Magento catalog URL

To Reproduce

  1. Go to the demo or local setup
  2. Visit any category or product page
  3. Category URL start with /category/xxxx
    Product URL start with /product/xxxxx

Expected behavior
Magento Catalog URL should stay same

Additional context
I'm not sure if this is a bug or it is expected behavior. If it is an expected behavior then why don't or we can't we keep all URL same as they are in a native Magento installation? It will be much better and easier for migrating from an existing website.

How can we install SSL for ubuntu 18.04

I have followed all steps but I got stuck at SSL installation. If you can guide us to install SSL on ubuntu 18.04 on the localhost set up so I can continue with scandi web PWA theme installation with the rest of the steps.

Docker setup is not supporting project specific theme development

Describe the bug
Current docker setup is tailored for core development and is not working correctly with project specific theme development.

To Reproduce
Create custom theme through cli command, e.g. MyCompany/pwa, and update configuration files (.env, webpack)

  1. the first issue is deployment procedure in deploy/start.sh. Function contains code that redeploys base theme from scratch every time, it fails if files are present and don't delete them, but it still contains hard coded values and is executed on every start up.

  2. the second issue is that theme path is hard coded in multiple places and is not prone to be changed easily.
    deploy/local/env
    deploy/start.sh
    docker-compose.frontend.yml

  3. after adjusting config and docker files to work with project specific theme, webpack scss compilation fails, src/app/design/frontend/PROJECT/pwa/src/config/webpack.development.config.js projectRoot has to changed with fallbackRoot.

  4. after importing sample data, migrations fail:

app_1            | Module 'ScandiPWA_Installer':
app_1            | Module 'Scandiweb_Core':
app_1            | Module 'ScandiPWA_Migrations':
app_1            | Caught exception: The stock item was unable to be saved. Please try again.
app_1            | Rolled back transaction has not been completed correctly.

Expected behavior
docker containers should be able to handle project specific theme development.

Warning throw when use session_start() function

Describe the bug
Server throws a log in var/log/system.log

[2020-04-17 08:20:26] main.ERROR: Warning: session_start(): Failed to read session data: user (path: /var/www/public/var/session/) in /var/www/public/vendor/magento/framework/Session/SessionManager.php on line 208 [] []

To Reproduce

  1. Go to the home page and another page

Screenshots
Screenshot from 2020-04-17 15-25-17

Desktop (please complete the following information):

  • OS: Ubuntu 18.04 LTS
  • Browser: Chrome

Product attributes with 'Used in Product Listing' set to 'Yes' are not present on the PLP

Definitions
PLP = Product List Page (category page)
PDP = Product Detail Page (product page)

Magento docs I used.

Describe the bug
Product attributes with Used in Product Listing set to Yes are not present in the GraphQL response on the PLP.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Stores -> Attributes -> Product -> Add new attribute
  2. Fill in Default Label as 'Promo Label'
  3. Fill in Attribute Code as 'promo_label'
  4. Set Visible on Catalog Pages on Storefront as No
  5. Set Used in Product Listing as Yes
  6. Save the attribute
  7. Re-index and flush cache

Expected behavior
The product attribute 'promo_label' should be:

  • Present in GraphQL response and visible on the PLP (like in screenshot 1)
  • Not visible on the PDP

Observation
When I changed Visible on Catalog Pages on Storefront to Yes the Promo Label is now displayed on the PLP and PDP, but this setting should only affect the PDP.
The screenshot below represent this observation.

Screenshots
Screenshot 1
image

Screenshot 2
image

There are no commands defined in the "config" namespace.

Describe the bug

I don't know if it's a bug, but I still can't install scandiaPWA, an error always comes up.

First it was permission in the src / folder, then it was with vanish
how are the outputs copied there.

Add user for MagentoDev application

RUN groupadd -g 1000 www
RUN useradd -u 1000 -ms /bin/bash -g www www
RUN gpasswd -a www root

To Reproduce
Steps to reproduce the behavior:

app_1 | There are no commands defined in the "config" namespace.
app_1 |
app_1 | Did you mean one of these?
app_1 | app:config
app_1 | module:config
app_1 | setup:config
app_1 | setup:store-config

Error reaching Varnish: Unable to connect to varnish:80 . Error #0: stream_socket_client(): unable to connect to varnish:80 (php_network_getaddresses: getaddrinfo failed: Name or service not known)

Browser support?

Hi there! ScandiPWA looks great from what I've seen so far!

I can't find an official browser support list (perhaps I've overlooked something). I see that the base theme uses Airbnb's default Babel browser targets, which does include IE11.

An official word from y'all would be helpful here! Thanks again.

Environment for local development with remote server

Currently it is not straightforward to work/develop on the PWA theme when we have an already running Magento instance in a remote server.

Would be noce to have an enviroment where we run the PWA theme locally, and we connect it to the remote server (graphql etc...)

I think this will help when migrations are done, where the PWA have to built in specifc store, with specific set of products cms pages etc.

Local SSL setup not complete

Describe the bug
The create_crt.sh script does not work and lacking documentation to create proper SSL certificates for local development

To Reproduce
Steps to reproduce the behavior:

  1. In terminal run ./create_crt.sh

Expected behavior
Should guide through SSL creating process and generate:

  • Local CA certificate and key
  • Application Certificate and key for ssl-nginx container
  • Script reruns checks for existing files and does not overwrite RootCA and it's key

Initial frontend config is misconfigured

Describe the bug
When setting the "frontend" environment (via adding the -f docker-compose.frontend.yml to docker-compose command) the frontend service exists with error:

npm ERR! path /var/www/public/package.json

To Reproduce
Steps to reproduce the behavior:

  1. Go to project base directory
  2. Run the docker-compose command:
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml -f docker-compose.frontend.yml up -d
  1. Check frontend service logs with docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml -f docker-compose.frontend.yml logs -f frontend

  2. Note the error stack trace:

frontend_1  | npm ERR! path /var/www/public/package.json
frontend_1  | npm ERR! code ENOENT
frontend_1  | npm ERR! errno -2
frontend_1  | npm ERR! syscall open
frontend_1  | npm ERR! enoent ENOENT: no such file or directory, open '/var/www/public/package.json'
frontend_1  | npm ERR! enoent This is related to npm not being able to find a file.
frontend_1  | npm ERR! enoent
frontend_1  |
frontend_1  | npm ERR! A complete log of this run can be found in:
frontend_1  | npm ERR!     /root/.npm/_logs/2019-03-11T10_46_46_105Z-debug.log
frontend_1  | npm ERR! path /var/www/public/package.json
frontend_1  | npm ERR! code ENOENT
frontend_1  | npm ERR! errno -2
frontend_1  | npm ERR! syscall open
frontend_1  | npm ERR! enoent ENOENT: no such file or directory, open '/var/www/public/package.json'
frontend_1  | npm ERR! enoent This is related to npm not being able to find a file.
frontend_1  | npm ERR! enoent
frontend_1  |
frontend_1  | npm ERR! A complete log of this run can be found in:
frontend_1  | npm ERR!     /root/.npm/_logs/2019-03-11T10_46_46_337Z-debug.log

Expected behavior
Fronted service compiles the application successfully.

Potential solution
After investigating the docker-compose.frontend.yml turned out, the incorrect folder has been mapped to the container.

The change of the mapped path to proposed in docs does not resolve the issue completely. The new issue related to files appears:

frontend_1  | ERROR in ./src/app/style/main.scss
...
frontend_1  | ModuleBuildError: Module build failed (from ./node_modules/sass-resources-loader/lib/loader.js):
frontend_1  | Error:
frontend_1  |       Something wrong with provided resources.
frontend_1  |       Make sure 'options.resources' is String or Array of Strings.
frontend_1  |
...
frontend_1  | ERROR in ./src/app/route/index.js
frontend_1  | Module not found: Error: Can't resolve '../component/Breadcrumbs' in '/var/www/public/src/app/route'
...

Error go to home page

Describe the bug
When I checkout to 2.x-stable branch and deploy
I go to home page It throws the error
Screenshot from 2020-02-03 18-16-24

Thanks

Assets handling for bootstraped theme has wrong paths

Describe the bug
No assets are delivered to the client if the theme is switched from preinstalled once.
Making impossible to have more than one theme installed on the instance.

To Reproduce
Steps to reproduce the behavior:

  1. First update scandipwa/installer to 1.3.2 version to make possible theme switching from the BE;
  2. Run php bin/magento scandipwa:theme:bootstrap AlexTse/pwa;
  3. In the theme do npm ci;
  4. In the theme do npm run build;
  5. Run setup:upgrade;
  6. Go to the BE and switch the theme for the store;
  7. Clean the caches;
  8. Open the Homepage and you will see the blank screen;
  9. Open the console and you will see that the js was requested from Scandiweb/pwa, despite that fact that the current active theme is AlexTse/pwa;

== Additional finding

  1. precache-manifest and manifest in newly bootstrapped theme has Scandiweb/pwa as a source for all assets.

Expected behavior
To make delivery of the content working after theme switching.

Screenshots
https://prnt.sc/o4ggjt - homepage of the newly bootstrapped theme.
https://prnt.sc/ - precache-manifest of AlexTse/pwa

Desktop (please complete the following information):
Does not matter, as it is a system issue

Additional context
On top, a bundle.js file is not moved to the static files for the bootstrapped theme

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.