Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Error with images cache after system migration

    Bug Report
    images cache cache image migrate front-end
    4
    5
    2484
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      n00best last edited by

      Introduction:

      Hi, I had a bagisto system installed and running over an AWS instance with ubuntu 18.04 and apache2. Recently I had to move the system to production. So I copied all the app's files to anothe AWS instance. This production instance is with nginx instead of Apache, but still ubuntu 16.04

      Main Problem:

      After the deploy all the images of products in the store has been broken. In the admin panel I can access the images and in database there's data in product_images table with the product id and the path to the image.

      The main problem is with the cache route when images are resized. I tried deleting and uploading again a product's image, but the problem persiste. When I try to access an image url in the browser it returns 404.

      I don't know which might be the problem. I've tried reaching the images to render generating the url by my self and it works just fine. But when using \Webkul\Product\Helpers\ProductImage all url's are broken.

      Environment Specs:

      PHP: 7.1.33
      Server: Nginx 1.14.0
      URL: http://equipate.com.co

      Working Examples:

      Code
      working-code.png

      Store
      working-front.png

      Not Working Examples:

      Code
      not-working-code.png

      Store
      not-working-front.png

      not-working-product.png

      Any help is usefull. I haven't made any modification to the core.

      Greetings,
      N00BEST

      1 Reply Last reply Reply Quote 0
      • V
        Vaishali Agarwal last edited by

        Hi @n00best

        Follow this link for solution - https://forums.bagisto.com/topic/188/broken-image-logo-in-bagisto-with-causes-and-solutions

        Thanks

        N 1 Reply Last reply Reply Quote 0
        • N
          n00best @Vaishali Agarwal last edited by

          Hi, @Vaishali-Agarwal

          I tried the solution, but problem still persists.

          The original symlink was made manually, but i tried unlink storage and then php artisan storage:link. Additionally I changed the .env file from:

          APP_URL=http://www.equipate.com.co

          To:

          APP_URL=http://equipate.com.co

          Nothing changed.

          I cleared all these cache:

          php artisan route:clear;
          php artisan cache:clear;
          php artisan config:clear;
          php artisan view:clear;
          

          But images routes similars to: http://equipate.com.co/cache/[size]/product/[id]/[image].jpeg still returning 404 error.

          The error does not occurs with images with routes like: http://equipate.com.co/storage/product/[id]/[image].jpeg. That's why I think the link you suggested does not solve the issue. The problem is not with the storage, but with the /cache/ route.

          Greetings,
          N00BEST

          1 Reply Last reply Reply Quote 0
          • P
            prateek-webkul last edited by

            @n00best said in Error with images cache after system migration:

            php artisan cache:clear;

            As we checked, there is an issue with your cache so once run the command in order as

            1. php artisan config:clear
            2. php artisan config:cache
            3. composer dump-autoload

            Please let us know, if your issue still exist..

            1 Reply Last reply Reply Quote 0
            • M
              maskeen last edited by

              I thing you have your path issue when you run it in local server it it will run smoothly but when you host on live server it will not pick path, thats whay it show page not found 404 etc.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post