Giter Club home page Giter Club logo

Comments (7)

alecritson avatar alecritson commented on June 8, 2024 1

Glad it solved the issue for you! and thanks again for the feedback.

from candy-api.

information-security avatar information-security commented on June 8, 2024

Problem (a) was due to a namespace problem caused by using dev branch. I made following changes in config/assets.php

        'vimeo' => GetCandy\Api\Assets\Drivers\Vimeo::class,
        'application' => GetCandy\Api\Assets\Drivers\File::class,
        'youtube' => GetCandy\Api\Assets\Drivers\YouTube::class,
        'image' => GetCandy\Api\Assets\Drivers\Image::class,
        'external' => GetCandy\Api\Assets\Drivers\ExternalImage::class

to

        'vimeo' => GetCandy\Api\Core\Assets\Drivers\Vimeo::class,
        'application' => GetCandy\Api\Core\Assets\Drivers\File::class,
        'youtube' => GetCandy\Api\Core\Assets\Drivers\YouTube::class,
        'image' => GetCandy\Api\Core\Assets\Drivers\Image::class,
        'external' => GetCandy\Api\Core\Assets\Drivers\ExternalImage::class

Now image is successfully uploaded and appears in media list but it has a problem with thumbnail generation. request to get thumbnail fails with 500 Internal Server Error (/storage/products/XW/thumbnails/thumbnail_XWZa0q0rkTVErEBDRxclv7NRRGZ1fuWVyvJn7mtI.png) In storage/logs/laravel.log I see following messages:

[2018-10-20 23:54:39] local.ERROR: Undefined variable: language (View: /Users/farzan/candy-store-dev/resources/views/_includes/head.blade.php) (View: /Users/farzan/candy-store-dev/resources/views/_includes/head.blade.php) (View: /Users/farzan/candy-store-dev/resources/views/_includes/head.blade.php) {"exception":"[object] (ErrorException(code: 0): Undefined variable: language (View: /Users/farzan/candy-store-dev/resources/views/_includes/head.blade.php) (View: /Users/farzan/candy-store-dev/resources/views/_includes/head.blade.php) (View: /Users/farzan/candy-store-dev/resources/views/_includes/head.blade.php) at /Users/farzan/candy-store-dev/storage/framework/views/56836fb81f926e60191e7e8f43a4c5f2f9d63c9f.php:6, ErrorException(code: 0): Undefined variable: language (View: /Users/farzan/candy-store-dev/resources/views/_includes/head.blade.php) (View: /Users/farzan/candy-store-dev/resources/views/_includes/head.blade.php) at /Users/farzan/candy-store-dev/storage/framework/views/56836fb81f926e60191e7e8f43a4c5f2f9d63c9f.php:6, ErrorException(code: 0): Undefined variable: language (View: /Users/farzan/candy-store-dev/resources/views/_includes/head.blade.php) at /Users/farzan/candy-store-dev/storage/framework/views/56836fb81f926e60191e7e8f43a4c5f2f9d63c9f.php:6, ErrorException(code: 0): Undefined variable: language at /Users/farzan/candy-store-dev/storage/framework/views/56836fb81f926e60191e7e8f43a4c5f2f9d63c9f.php:6)
[stacktrace]
#0 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(45): Illuminate\\View\\Engines\\CompilerEngine->handleViewException(Object(ErrorException), 1)
#1 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(59): Illuminate\\View\\Engines\\PhpEngine->evaluatePath('/Users/farzan/b...', Array)
#2 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/View/View.php(142): Illuminate\\View\\Engines\\CompilerEngine->get('/Users/farzan/b...', Array)
#3 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/View/View.php(125): Illuminate\\View\\View->getContents()
#4 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/View/View.php(90): Illuminate\\View\\View->renderContents()
#5 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Http/Response.php(42): Illuminate\\View\\View->render()
#6 /Users/farzan/candy-store-dev/vendor/symfony/http-foundation/Response.php(202): Illuminate\\Http\\Response->setContent(Object(Illuminate\\View\\View))
#7 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Routing/ResponseFactory.php(55): Symfony\\Component\\HttpFoundation\\Response->__construct(Object(Illuminate\\View\\View), 404, Array)
#8 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Routing/ResponseFactory.php(69): Illuminate\\Routing\\ResponseFactory->make(Object(Illuminate\\View\\View), 404, Array)
#9 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(379): Illuminate\\Routing\\ResponseFactory->view('errors::404', Array, 404, Array)
#10 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(288): Illuminate\\Foundation\\Exceptions\\Handler->renderHttpException(Object(Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException))
#11 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(187): Illuminate\\Foundation\\Exceptions\\Handler->prepareResponse(Object(Illuminate\\Http\\Request), Object(Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException))
#12 /Users/farzan/candy-store-dev/app/Exceptions/Handler.php(47): Illuminate\\Foundation\\Exceptions\\Handler->render(Object(Illuminate\\Http\\Request), Object(Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException))
#13 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(83): App\\Exceptions\\Handler->render(Object(Illuminate\\Http\\Request), Object(Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException))
#14 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): Illuminate\\Routing\\Pipeline->handleException(Object(Illuminate\\Http\\Request), Object(Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException))
#15 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(31): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#16 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#17 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#18 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(31): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#19 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#20 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#21 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#22 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#23 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#24 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(62): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#25 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#26 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#27 /Users/farzan/candy-store-dev/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkMiddleware.php(28): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#28 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Clockwork\\Support\\Laravel\\ClockworkMiddleware->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#29 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#30 /Users/farzan/candy-store-dev/vendor/barryvdh/laravel-cors/src/HandlePreflight.php(29): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#31 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Barryvdh\\Cors\\HandlePreflight->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#32 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#33 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#34 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#35 /Users/farzan/candy-store-dev/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#36 /Users/farzan/candy-store-dev/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#37 {main}
"} 

Also, trying to download image fails with the same above message

from candy-api.

information-security avatar information-security commented on June 8, 2024

Running php artisan storage:link fixed the problem with thumbnail and image loading. shouldn't this command be executed during installation or did I miss something in wiki instructions?

Problem with uploading large image files still persists.

from candy-api.

alecritson avatar alecritson commented on June 8, 2024

Thanks for this, have you tried setting ASSETS_MAX_FILESIZE in your env file to a large size? I have been able to upload large files locally this end.

Agreed master is outdated, we're trying to get a release cycle up and running soon, probably once we get to a beta stage.

from candy-api.

information-security avatar information-security commented on June 8, 2024

@alecritson Thanks for your reply, I'm at least confident now that this project is continuing. Your work is really appreciable and I think it deserves more community attention than what it received so far.
I put ASSETS_MAX_FILESIZE=1000000 to .env file and tried uploading a 3.6MB jpg file but it made no difference and I am still getting same error.

Considering the fact that no documentations is available, having a working candy-store repo could help us learn more about API and HUB and therefore to put more contribution to your project from open-source community. Currently I am putting a lot of effort to just overcome a lot of difficulties I am facing to have a working candy-store installation. There are lots of errors (I can't even do a successful login to candy-store installation and a lot of hub's features are broken) and I am not sure if I need to post new issues for these problems or should I fix them locally.

from candy-api.

alecritson avatar alecritson commented on June 8, 2024

I'm not sure what could be causing the issue at this point, can you confirm what the PHP setting is for upload size?

Thanks for the feedback, if you find issues, feel free to post them on Github. Currently, it's in alpha so support for issues may be limited or it might be they are fixed for the next release. We are going to get a release schedule going as soon as possible.

from candy-api.

information-security avatar information-security commented on June 8, 2024

How did I miss that obvious PHP setting!! Sorry for taking your time.
A combination of modifying upload_max_filesize in php.ini and adding ASSETS_MAX_FILESIZE to .env file solved this problem. You may now close this issue.

Thanks for your valuable notes though.

from candy-api.

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.