Giter Club home page Giter Club logo

froshbunnycdnmediastorage's People

Contributors

imgbotapp avatar shyim avatar tinect avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

froshbunnycdnmediastorage's Issues

really really really slow

i have the issue that it is really slow to transfer the media files to bunnycdn. its about 13 files in 15 minutes. thats crazy. i there something i can do?

Plugin not compatible with Shopware 5.5.8

The given options wich are required for the config.php are no longer valid.

In OptionsResolver.php line 645:
The options "apiKey", "apiUrl" do not exist. Defined options are: "dir", "file", "mediaUrl", "permissions", "root", "type", "url".

Uninstallation

Question

Hi there,

do I understand right that...

  • the local files will be deleted after the migration?
  • If I add new products, do I need to start the migration again (eg. via script)?
  • uninstallation is only: delete the plugin and change the config file back. Right?

Thanks
Stefan

Can't migrate back from bcdb

Question

Dear all,

after migrating a test of round 380 images I have tried to migrate back from CDN to the local Shopware installation: bin/console sw:media:migrate --from=bunnycdn --to=local

But after 84% I received the following message:
failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /var/www/xxx.de/custom/plugins/FroshBunnycdnMediaStorage/Components/BunnyCDNAdapter.php on line 319

In Filesystem.php line 112:
League\Flysystem\Filesystem::putStream expects argument #2 to be a valid resource.
sw:media:migrate [--from [FROM]] [--to [TO]] [--skip-scan]

Any Ideas what to do?

Thanks
Stefan

Using Bunny Optimizer => Manipulation Engine

Add option to replace thumbnail-generation and their url-generation to use Bunny Optimizer โ‡’ Manipulation Engine instead
https://support.bunnycdn.com/hc/en-us/articles/360027448392-Bunny-Optimizer-Engine-Documentation
f.e.
old: https://www.domain.com/media/image/72/b1/25/52105-BE_1567033223_1280x1280.jpg
new: https://www.domain.com/media/image/d6/eb/43/52105-BE_1567033223.jpg?width=1280
https://www.domain.com/media/image/d6/eb/43/52105-BE_1567033223.jpg?width=1920
[...]

Benefits:

  • save space
  • no surcharge to Bunny Optimizer

TODO:

  • manipulate media-struct
  • overwrite engine\Shopware\Components\Thumbnail\Manager\getMediaThumbnails
  • overwrite engine\Shopware\Models\Media\Media\getThumbnailFilePaths
    (until shopware/shopware#2267 is merged, we cannot support managing this function)
  • don't create thumbnails, just 140x140

https://github.com/FriendsOfShopware/FroshBunnycdnMediaStorage/tree/manipulationEngine

Exception, message: "File not found: media/image/..."

The plugin has been installed and the config.php is set according to the manual.
Uplodaing a file through the file explorer does not work and we receive this error message:

exception: {_class: "Exception"}
_class: "Exception"
message: "File not found: media/image/cimage_6_kat1_1.jpg"
success: false

This is the config.php cdn section

'cdn' => [
    'backend' => 'bunnycdn',
    'liveMigration' => true,
    'adapters' => [
        'bunnycdn' =>
            [
                'type' => 'bunnycdn',
                'mediaUrl' => 'https://xxxxxxxx.b-cdn.net/',
                'apiUrl' => 'https://storage.bunnycdn.com/xxxxxxxxxx/',
                'apiKey' => 'xxxxxxxxxxxxxxxxxxxxxxxxx'
            ]
    ]
]

Afterwards, the file is still uploaded to bunnycdn and the link to medium shows the image.
But in the Shopware media manager, there is no preview visible for this image.

Local copy

we using the plugin since some days and it works good.
However we using an Product Designer that creates and upload to the media folder files and want to read them as well there. This creates an error as the Product Designer looking for the local file that has been uploaded to the cdn by the plugin.

Is it possible to configure that an local copy is still on the server that the plugin can read them?

New images no thumbnails

Question

Hello, slowly I despair a little, unfortunately, which is why I hope for help here.

Under SW6 in other projects everything works like a charm but currently I'm working on a SW5 store. We have installed and configured the plugin as described (https://support.bunny.net/hc/en-us/articles/360018577551-How-to-speed-up-your-Shopware-site-with-BunnyCDN).

The images are all in storage(BunnyCDN) and are outputting as desired. So far so good. Now when I upload images an error message appears from SW (The selected file exceeds the maximum allowed upload size. Please select another file). This error appeared only after I switched from adapter from local to bunnycdn. Funny thing is that the file is still uploaded and also transferred to storage but no thumbnails are created.

When I try to generate thumbnails via sw:thumbnail:generate
I get the following error:
Generating Thumbnails for Album Blog (ID: -11)
0 [>---------------------------]
Generating Thumbnails for Album Einkaufswelten (ID: -3)
0/63 [>---------------------------] 0%PHP Fatal error: Uncaught TypeError: stream_get_contents(): Argument #1 ($stream) must be of type resource, bool given in /var/www/vhosts/web901.michelle.webhoster.ag/httpdocs/_frohmarie/custom/plugins/FroshBunnycdnMediaStorage/Components/BunnyCDNAdapter.php:302

And yes, before I changed
local to bunnyCDN, the media upload and thumbnails worked.

'cdn' => [
    'backend' => 'local', /* change this after transfer to bunnycdn */
        'adapters' => [

Do you have any idea what this could be?

Best Regards

Timo

mediamanager emty after migration

hey! nice work - usd this three times now and all is working well.
for an actual project now the media manager is completly emty after migration.
CDN adapter in config.hp is correctly set. what could gone wrong?
sw:media:cleanup dont help. any ideas for that? shopware 5.6.9

media-manager response time up to 10 s

Hey Hey, i am using the BunnyCDN adapter in a new shop, where i have around 8000 images.
but when i try to access the media manager, it takes 5-15 s o connect to bunny and load the images there.
is there a way to short this time? i have often 500 Server timeout which that and it seems to be the connection
time to bunny that is slow. maybe you have an idea if there is something else i can make faster?
its the same issue when i try to upload images in a artikel. often i get 500 error or long loading times.
maybe you have ideas what i maybe made wrong or configure better to avoid this.
greetz, matthias

Plugin Issue Cant Upload

I cant upload any new media using the extension.

The Migration worked fine although a bit slow.

Shopware version is 5.5.9 with PHP 7.0. is there any ideas? The config is:

'cdn' =>
[
'backend' => 'bunnycdn',
'adapters' => [
'bunnycdn' =>
array (
'type' => 'bunnycdn',
'mediaUrl' => 'https://cdn.gamingnerds.co.uk',
'apiUrl' => 'https://storage.bunnycdn.com/My Storage Name/',
'apiKey' => 'My Api Key'
)
]
]

sw:thumbnail:generate fails with php 8

PHP Version

8.2.3

Shopware Version

5.7.17

Actual behaviour

thumbnail:generation process is not working from backend or console, if changing php from 7.4 to 8.2.x
it is working if config.php contains a cdn > local - it is now, if it contains the bunnycdn as cdn
media manager is showing images correctly
just the image processing is not working for thumbnail genaueration., it fails with a fopen() issue.

Expected behaviour

Full Stack Trace:

Fatal error: Uncaught TypeError: fclose(): supplied resource is not a valid stream resource in /var/www/clients/client1/web1/web/shop/engine/Shopware/Components/Thumbnail/Generator/Basic.php:333

Stack trace:

#0 /var/www/clients/client1/web1/web/shop/engine/Shopware/Components/Thumbnail/Generator/Basic.php(333): fclose()

#1 /var/www/clients/client1/web1/web/shop/engine/Shopware/Components/Thumbnail/Generator/Basic.php(295): Shopware\Components\Thumbnail\Generator\Basic->uploadImage()

#2 /var/www/clients/client1/web1/web/shop/engine/Shopware/Components/Thumbnail/Generator/Basic.php(106): Shopware\Components\Thumbnail\Generator\Basic->optimizeImage()

#3 /var/www/clients/client1/web1/web/shop/engine/Shopware/Components/Thumbnail/Manager.php(145): Shopware\Components\Thumbnail\Generator\Basic->createThumbnail()

#4 /var/www/clients/client1/web1/web/shop/engine/Shopware/Models/Media/Media.php(1187): Shopware\Components\Thumbnail\Manager->createMediaThumbnail()

#5 /var/www/clients/client1/web1/web/shop/engine/Shopware/Models/Media/Media.php(856): Shopware\Models\Media\Media->createThumbnail()

#6 /var/www/clients/client1/web1/web/shop/engine/Shopware/Models/Media/Media.php(706): Shopware\Models\Media\Media->loadThumbnails()

#7 /var/www/clients/client1/web1/web/shop/vendor/doctrine/orm/lib/Doctrine/ORM/Event/ListenersInvoker.php(83): Shopware\Models\Media\Media->onLoad()

#8 /var/www/clients/client1/web1/web/shop/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/HydrationCompleteHandler.php(66): Doctrine\ORM\Event\ListenersInvoker->invoke()

#9 /var/www/clients/client1/web1/web/shop/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(3654): Doctrine\ORM\Internal\HydrationCompleteHandler->hydrationComplete()

#10 /var/www/clients/client1/web1/web/shop/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php(52): Doctrine\ORM\UnitOfWork->hydrationComplete()

#11 /var/www/clients/client1/web1/web/shop/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php(272): Doctrine\ORM\Internal\Hydration\SimpleObjectHydrator->cleanup()

#12 /var/www/clients/client1/web1/web/shop/engine/Library/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(803): Doctrine\ORM\Internal\Hydration\AbstractHydrator->hydrateAll()

#13 /var/www/clients/client1/web1/web/shop/engine/Library/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(867): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load()

#14 /var/www/clients/client1/web1/web/shop/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(2798): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->loadOneToOneEntity()

#15 /var/www/clients/client1/web1/web/shop/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php(266): Doctrine\ORM\UnitOfWork->createEntity()

#16 /var/www/clients/client1/web1/web/shop/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php(492): Doctrine\ORM\Internal\Hydration\ObjectHydrator->getEntity()

#17 /var/www/clients/client1/web1/web/shop/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php(148): Doctrine\ORM\Internal\Hydration\ObjectHydrator->hydrateRowData()

#18 /var/www/clients/client1/web1/web/shop/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php(270): Doctrine\ORM\Internal\Hydration\ObjectHydrator->hydrateAllData()

#19 /var/www/clients/client1/web1/web/shop/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(1234): Doctrine\ORM\Internal\Hydration\AbstractHydrator->hydrateAll()

#20 /var/www/clients/client1/web1/web/shop/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(1175): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache()

#21 /var/www/clients/client1/web1/web/shop/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(911): Doctrine\ORM\AbstractQuery->execute()

#22 /var/www/clients/client1/web1/web/shop/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php(171): Doctrine\ORM\AbstractQuery->getResult()

#23 /var/www/clients/client1/web1/web/shop/engine/Shopware/Commands/ThumbnailGenerateCommand.php(207): Doctrine\ORM\Tools\Pagination\Paginator->getIterator()

#24 /var/www/clients/client1/web1/web/shop/engine/Shopware/Commands/ThumbnailGenerateCommand.php(140): Shopware\Commands\ThumbnailGenerateCommand->createAlbumThumbnails()

#25 /var/www/clients/client1/web1/web/shop/vendor/symfony/console/Command/Command.php(255): Shopware\Commands\ThumbnailGenerateCommand->execute()

#26 /var/www/clients/client1/web1/web/shop/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()

#27 /var/www/clients/client1/web1/web/shop/engine/Shopware/Components/Console/Application.php(131): Symfony\Component\Console\Application->doRunCommand()

#28 /var/www/clients/client1/web1/web/shop/vendor/symfony/console/Application.php(273): Shopware\Components\Console\Application->doRunCommand()

#29 /var/www/clients/client1/web1/web/shop/engine/Shopware/Components/Console/Application.php(110): Symfony\Component\Console\Application->doRun()

#30 /var/www/clients/client1/web1/web/shop/vendor/symfony/console/Application.php(149): Shopware\Components\Console\Application->doRun()

#31 /var/www/clients/client1/web1/web/shop/bin/console(38): Symfony\Component\Console\Application->run()

#32 {main}

thrown in /var/www/clients/client1/web1/web/shop/engine/Shopware/Components/Thumbnail/Generator/Basic.php on line 333

Steps to Reproduce?

try sw:thumbnail:generate

Errors in eventlog

Question

Hello,

I have these errors in the Event Log, is this something that comes from the plugin? Ifso, is there an way to fix this?
In the Bunny log there are no error.

afbeelding

Thanks,
Tim

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.