Code Monkey home page Code Monkey logo

Comments (21)

Incremental92 avatar Incremental92 commented on June 18, 2024

Ahoj Ricardo,
I moved to another project with same architecture.
Testing the following route

    Route::middleware(['api'])->group(function () {
        Route::get('produits', function () {
            $produits = Produit::all();
            return $produits;
        });

invoked as : localhost/produits
renders the following error :
image

I'm really stuck now as non authenticated routes doesn't work ;-((

from wn-cors-plugin.

rluders avatar rluders commented on June 18, 2024

I reported it to the OctoberCMS team, it seems to be an issue related to Marketplace itself. I'll keep following its progress.

from wn-cors-plugin.

rluders avatar rluders commented on June 18, 2024

Install the plugin from Github:

  1. Just download the last plugin release here
  2. Extracts its content in the plugins/rluders/cors
  3. Copy the composer.json and the tests/ folder from the OctoberCMS repository and put both in your OctoberCMS root folder
  4. Edit your config/cms.php file and change the disableCoreUpdates to true
  5. From the OctoberCMS root folder, execute the composer update command

It should install all the plugins dependency and you are good to go.

from wn-cors-plugin.

Incremental92 avatar Incremental92 commented on June 18, 2024

The plugin was updated successfully by October but nothing changed.
I tried 'composer install' but there was no composer.json file.
I extracted the one from your zip and retried.
I got the following messages with errors relating to your CORS. To the questions I answered YES :
Would you like to try reinstalling the package instead [yes]?
and got :

The "composer/installers" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
No lock file found. Updating dependencies instead of installing from lock file. Use composer update over composer install if you do not have a lock file.
Loading composer repositories with package information
Updating dependencies
Lock file operations: 28 installs, 0 updates, 0 removals

  • Locking asm89/stack-cors (v2.0.2)
  • Locking composer/installers (v1.10.0)
  • Locking doctrine/inflector (2.0.3)
  • Locking fruitcake/laravel-cors (v2.0.3)
  • Locking illuminate/collections (v8.24.0)
  • Locking illuminate/contracts (v8.24.0)
  • Locking illuminate/macroable (v8.24.0)
  • Locking illuminate/support (v8.24.0)
  • Locking nesbot/carbon (2.43.0)
  • Locking psr/container (1.0.0)
  • Locking psr/event-dispatcher (1.0.0)
  • Locking psr/log (1.1.3)
  • Locking psr/simple-cache (1.0.1)
  • Locking symfony/deprecation-contracts (v2.2.0)
  • Locking symfony/error-handler (v5.2.1)
  • Locking symfony/event-dispatcher (v5.2.1)
  • Locking symfony/event-dispatcher-contracts (v2.2.0)
  • Locking symfony/http-client-contracts (v2.3.1)
  • Locking symfony/http-foundation (v5.2.1)
  • Locking symfony/http-kernel (v5.2.1)
  • Locking symfony/polyfill-ctype (v1.22.0)
  • Locking symfony/polyfill-mbstring (v1.22.0)
  • Locking symfony/polyfill-php73 (v1.22.0)
  • Locking symfony/polyfill-php80 (v1.22.0)
  • Locking symfony/translation (v5.2.1)
  • Locking symfony/translation-contracts (v2.3.0)
  • Locking symfony/var-dumper (v5.2.1)
  • Locking voku/portable-ascii (1.5.6)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 20 installs, 8 updates, 4 removals
  • Downloading symfony/deprecation-contracts (v2.2.0)
  • Syncing symfony/http-foundation (v5.2.1) into cache
  • Downloading symfony/http-client-contracts (v2.3.1)
  • Downloading psr/event-dispatcher (1.0.0)
  • Downloading symfony/event-dispatcher-contracts (v2.2.0)
  • Syncing symfony/event-dispatcher (v5.2.1) into cache
  • Downloading symfony/var-dumper (v5.2.1)
  • Syncing psr/log (1.1.3) into cache
  • Downloading symfony/error-handler (v5.2.1)
  • Syncing symfony/http-kernel (v5.2.1) into cache
  • Downloading voku/portable-ascii (1.5.6)
  • Downloading symfony/translation-contracts (v2.3.0)
  • Downloading symfony/translation (v5.2.1)
  • Downloading illuminate/macroable (v8.24.0)
  • Downloading psr/simple-cache (1.0.1)
  • Downloading psr/container (1.0.0)
  • Downloading illuminate/contracts (v8.24.0)
  • Downloading illuminate/collections (v8.24.0)
  • Downloading illuminate/support (v8.24.0)
  • Syncing asm89/stack-cors (v2.0.2) into cache
  • Downloading fruitcake/laravel-cors (v2.0.3)
  • Removing symfony/polyfill-php70 (v1.10.0)
  • Removing symfony/debug (3.4.x-dev 667a26c)
  • Removing paragonie/random_compat (v9.99.99.x-dev 0947f25)
  • Removing barryvdh/laravel-cors (dev-master 1072855)
  • Upgrading composer/installers (v1.6.0 => v1.10.0): Extracting archive
  • Installing symfony/polyfill-php80 (v1.22.0): Extracting archive
  • Installing symfony/polyfill-php73 (v1.22.0): Extracting archive
  • Upgrading symfony/polyfill-ctype (v1.10.0 => v1.22.0): Extracting archive
  • Upgrading symfony/polyfill-mbstring (v1.10.0 => v1.22.0): Extracting archive
  • Installing symfony/deprecation-contracts (v2.2.0): Extracting archive
  • Upgrading symfony/http-foundation (3.4.x-dev 9a81d23 => v5.2.1): Update failed (The .git directory is missing from C:\Dev\WinNMP\WWW\Oct_Test\plugins\rluders\cors\vendor\symfony\http-foundation, see https://getcomposer.org/commit-deps for more information)
    Would you like to try reinstalling the package instead [yes]?
  • Removing symfony/http-foundation (3.4.x-dev 9a81d23)
  • Installing symfony/http-foundation (v5.2.1): Cloning a1f6218b29 from cache
  • Installing symfony/http-client-contracts (v2.3.1): Extracting archive
  • Installing psr/event-dispatcher (1.0.0): Extracting archive
  • Installing symfony/event-dispatcher-contracts (v2.2.0): Extracting archive
  • Upgrading symfony/event-dispatcher (3.4.x-dev ed5be16 => v5.2.1): Update failed (The .git directory is missing from C:\Dev\WinNMP\WWW\Oct_Test\plugins\rluders\cors\vendor\symfony\event-dispatcher, see https://getcomposer.org/commit-deps for more information)
    Would you like to try reinstalling the package instead [yes]?
  • Removing symfony/event-dispatcher (3.4.x-dev ed5be16)
  • Installing symfony/event-dispatcher (v5.2.1): Cloning 1c93f7a1df from cache
  • Installing symfony/var-dumper (v5.2.1): Extracting archive
  • Downgrading psr/log (dev-master c4421fc => 1.1.3): Update failed (The .git directory is missing from C:\Dev\WinNMP\WWW\Oct_Test\plugins\rluders\cors\vendor\psr\log, see https://getcomposer.org/commit-deps for more information)
    Would you like to try reinstalling the package instead [yes]?
  • Removing psr/log (dev-master c4421fc)
  • Installing psr/log (1.1.3): Cloning 0f73288fd1 from cache
  • Installing symfony/error-handler (v5.2.1): Extracting archive
  • Upgrading symfony/http-kernel (3.4.x-dev 798807f => v5.2.1): Update failed (The .git directory is missing from C:\Dev\WinNMP\WWW\Oct_Test\plugins\rluders\cors\vendor\symfony\http-kernel, see https://getcomposer.org/commit-deps for more information)
    Would you like to try reinstalling the package instead [yes]?
  • Removing symfony/http-kernel (3.4.x-dev 798807f)
  • Installing symfony/http-kernel (v5.2.1): Cloning 1feb619286 from cache
  • Installing voku/portable-ascii (1.5.6): Extracting archive
  • Installing symfony/translation-contracts (v2.3.0): Extracting archive
  • Installing symfony/translation (v5.2.1): Extracting archive
  • Installing nesbot/carbon (2.43.0): Extracting archive
  • Installing illuminate/macroable (v8.24.0): Extracting archive
  • Installing psr/simple-cache (1.0.1): Extracting archive
  • Installing psr/container (1.0.0): Extracting archive
  • Installing illuminate/contracts (v8.24.0): Extracting archive
  • Installing illuminate/collections (v8.24.0): Extracting archive
  • Installing doctrine/inflector (2.0.3): Extracting archive
  • Installing illuminate/support (v8.24.0): Extracting archive
  • Downgrading asm89/stack-cors (dev-master c163e2b => v2.0.2): Update failed (The .git directory is missing from C:\Dev\WinNMP\WWW\Oct_Test\plugins\rluders\cors\vendor\asm89\stack-cors, see https://getcomposer.org/commit-deps for more information)
    Would you like to try reinstalling the package instead [yes]?
  • Removing asm89/stack-cors (dev-master c163e2b)
  • Installing asm89/stack-cors (v2.0.2): Cloning 8d8f88b3b3 from cache
  • Installing fruitcake/laravel-cors (v2.0.3): Extracting archive
    14 package suggestions were added by new dependencies, use composer suggest to see details.
    Generating autoload files
    19 packages you are using are looking for funding.
    Use the composer fund command to find out more!

I get now a white screen, in backend and frontend ;-((

from wn-cors-plugin.

rluders avatar rluders commented on June 18, 2024

Wow! @Incremental92 this is really helpful. Thank you.

Let me see if I can reproduce it, and figured out what is going on.

from wn-cors-plugin.

Incremental92 avatar Incremental92 commented on June 18, 2024

You're welcome.
I restored my backup and disabled CORS plugin. I get my route result with : localhost/produits

from wn-cors-plugin.

Incremental92 avatar Incremental92 commented on June 18, 2024

Ricardo, maybe I miss something, but if I deacivate CORS in Oct Backend
image

I get the following errors with CORS in my client app which gets stucked :
image

from wn-cors-plugin.

rluders avatar rluders commented on June 18, 2024

@Incremental92 I updated the instructions, I tested it here, and seems to work fine. Can you test it?

No updates from Market Place yet.

from wn-cors-plugin.

Incremental92 avatar Incremental92 commented on June 18, 2024

Well I followed your instructions and got the following :

composer update
The "wikimedia/composer-merge-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
Loading composer repositories with package information
Updating dependencies
Lock file operations: 100 installs, 0 updates, 0 removals
  - Locking composer/installers (v1.10.0)
  - Locking dms/phpunit-arraysubset-asserts (v0.1.1)
  - Locking dnoegel/php-xdg-base-dir (v0.1.1)
  - Locking doctrine/cache (1.10.2)
  - Locking doctrine/dbal (2.10.4)
  - Locking doctrine/event-manager (1.1.1)
  - Locking doctrine/inflector (2.0.3)
  - Locking doctrine/instantiator (1.4.0)
  - Locking doctrine/lexer (1.2.1)
  - Locking dragonmantank/cron-expression (v2.3.1)
  - Locking egulias/email-validator (2.1.25)
  - Locking erusev/parsedown (1.7.4)
  - Locking erusev/parsedown-extra (0.8.1)
  - Locking fzaninotto/faker (v1.9.2)
  - Locking hamcrest/hamcrest-php (v2.0.1)
  - Locking laravel/framework (v6.18.43)
  - Locking laravel/tinker (v2.4.2)
  - Locking league/commonmark (1.5.7)
  - Locking league/csv (9.5.0)
  - Locking league/flysystem (1.0.70)
  - Locking linkorb/jsmin-php (1.0.0)
  - Locking meyfa/phpunit-assert-gd (v2.0.0)
  - Locking mockery/mockery (1.3.3)
  - Locking monolog/monolog (2.2.0)
  - Locking myclabs/deep-copy (1.10.2)
  - Locking nesbot/carbon (2.43.0)
  - Locking nikic/php-parser (v4.10.4)
  - Locking october/backend (v1.1.1)
  - Locking october/cms (v1.1.1)
  - Locking october/rain (v1.1.1)
  - Locking october/system (v1.1.1)
  - Locking opis/closure (3.6.1)
  - Locking paragonie/random_compat (v9.99.99)
  - Locking phar-io/manifest (2.0.1)
  - Locking phar-io/version (3.0.4)
  - Locking php-parallel-lint/php-parallel-lint (v1.2.0)
  - Locking phpdocumentor/reflection-common (2.2.0)
  - Locking phpdocumentor/reflection-docblock (5.2.2)
  - Locking phpdocumentor/type-resolver (1.4.0)
  - Locking phpoption/phpoption (1.7.5)
  - Locking phpspec/prophecy (1.12.2)
  - Locking phpunit/php-code-coverage (7.0.14)
  - Locking phpunit/php-file-iterator (2.0.3)
  - Locking phpunit/php-text-template (1.2.1)
  - Locking phpunit/php-timer (2.1.3)
  - Locking phpunit/php-token-stream (3.1.2)
  - Locking phpunit/phpunit (8.5.14)
  - Locking psr/container (1.0.0)
  - Locking psr/log (1.1.3)
  - Locking psr/simple-cache (1.0.1)
  - Locking psy/psysh (v0.10.6)
  - Locking ramsey/uuid (3.9.3)
  - Locking scssphp/scssphp (v1.4.1)
  - Locking sebastian/code-unit-reverse-lookup (1.0.2)
  - Locking sebastian/comparator (3.0.3)
  - Locking sebastian/diff (3.0.3)
  - Locking sebastian/environment (4.2.4)
  - Locking sebastian/exporter (3.1.3)
  - Locking sebastian/global-state (3.0.1)
  - Locking sebastian/object-enumerator (3.0.4)
  - Locking sebastian/object-reflector (1.1.2)
  - Locking sebastian/recursion-context (3.0.1)
  - Locking sebastian/resource-operations (2.0.2)
  - Locking sebastian/type (1.1.4)
  - Locking sebastian/version (2.0.1)
  - Locking squizlabs/php_codesniffer (3.5.8)
  - Locking swiftmailer/swiftmailer (v6.2.5)
  - Locking symfony/console (v4.4.18)
  - Locking symfony/css-selector (v4.4.18)
  - Locking symfony/debug (v4.4.18)
  - Locking symfony/error-handler (v4.4.18)
  - Locking symfony/event-dispatcher (v4.4.18)
  - Locking symfony/event-dispatcher-contracts (v1.1.9)
  - Locking symfony/finder (v4.4.18)
  - Locking symfony/http-client-contracts (v1.1.10)
  - Locking symfony/http-foundation (v4.4.18)
  - Locking symfony/http-kernel (v4.4.18)
  - Locking symfony/mime (v4.4.18)
  - Locking symfony/polyfill-ctype (v1.22.0)
  - Locking symfony/polyfill-iconv (v1.22.0)
  - Locking symfony/polyfill-intl-idn (v1.22.0)
  - Locking symfony/polyfill-intl-normalizer (v1.22.0)
  - Locking symfony/polyfill-mbstring (v1.22.0)
  - Locking symfony/polyfill-php72 (v1.22.0)
  - Locking symfony/polyfill-php73 (v1.22.0)
  - Locking symfony/polyfill-php80 (v1.22.0)
  - Locking symfony/process (v4.4.18)
  - Locking symfony/routing (v4.4.18)
  - Locking symfony/service-contracts (v1.1.9)
  - Locking symfony/translation (v4.4.18)
  - Locking symfony/translation-contracts (v1.1.10)
  - Locking symfony/var-dumper (v4.4.18)
  - Locking symfony/yaml (v3.4.47)
  - Locking theseer/tokenizer (1.2.0)
  - Locking tijsverkoyen/css-to-inline-styles (2.2.3)
  - Locking twig/twig (v2.13.1)
  - Locking vlucas/phpdotenv (v3.6.8)
  - Locking webmozart/assert (1.9.1)
  - Locking wikimedia/composer-merge-plugin (dev-feature/composer-v2 a8c5a89)
  - Locking wikimedia/less.php (v2.0.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 50 installs, 39 updates, 13 removals
  - Removing symfony/polyfill-util (v1.19.0)
  - Removing symfony/polyfill-php70 (v1.19.0)
  - Removing symfony/polyfill-php56 (v1.19.0)
  - Removing mtdowling/cron-expression (v1.2.3)
  - Removing leafo/scssphp (v0.8.4)
  - Removing kylekatarnls/update-helper (1.2.1)
  - Removing kriswallsmith/assetic (v1.4.0)
  - Removing jenssegers/date (v3.5.0)
  - Removing jakub-onderka/php-console-highlighter (v0.4)
  - Removing jakub-onderka/php-console-color (v0.2)
  - Removing doctrine/common (v2.7.3)
  - Removing doctrine/collections (v1.4.0)
  - Removing doctrine/annotations (v1.4.0)
  - Upgrading composer/installers (v1.9.0 => v1.10.0): Extracting archive
  - Upgrading wikimedia/composer-merge-plugin (v1.4.1 => dev-feature/composer-v2 a8c5a89): Extracting archive
  - Installing sebastian/version (2.0.1): Extracting archive
  - Installing sebastian/type (1.1.4): Extracting archive
  - Installing sebastian/resource-operations (2.0.2): Extracting archive
  - Installing sebastian/recursion-context (3.0.1): Extracting archive
  - Installing sebastian/object-reflector (1.1.2): Extracting archive
  - Installing sebastian/object-enumerator (3.0.4): Extracting archive
  - Installing sebastian/global-state (3.0.1): Extracting archive
  - Installing sebastian/exporter (3.1.3): Extracting archive
  - Installing sebastian/environment (4.2.4): Extracting archive
  - Installing sebastian/diff (3.0.3): Extracting archive
  - Installing sebastian/comparator (3.0.3): Extracting archive
  - Installing phpunit/php-timer (2.1.3): Extracting archive
  - Installing phpunit/php-text-template (1.2.1): Extracting archive
  - Installing phpunit/php-file-iterator (2.0.3): Extracting archive
  - Installing theseer/tokenizer (1.2.0): Extracting archive
  - Installing sebastian/code-unit-reverse-lookup (1.0.2): Extracting archive
  - Installing phpunit/php-token-stream (3.1.2): Extracting archive
  - Installing phpunit/php-code-coverage (7.0.14): Extracting archive
  - Upgrading symfony/polyfill-ctype (v1.19.0 => v1.22.0): Extracting archive
  - Installing webmozart/assert (1.9.1): Extracting archive
  - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive
  - Installing phpdocumentor/type-resolver (1.4.0): Extracting archive
  - Installing phpdocumentor/reflection-docblock (5.2.2): Extracting archive
  - Installing doctrine/instantiator (1.4.0): Extracting archive
  - Installing phpspec/prophecy (1.12.2): Extracting archive
  - Installing phar-io/version (3.0.4): Extracting archive
  - Installing phar-io/manifest (2.0.1): Extracting archive
  - Installing myclabs/deep-copy (1.10.2): Extracting archive
  - Installing phpunit/phpunit (8.5.14): Extracting archive
  - Installing dms/phpunit-arraysubset-asserts (v0.1.1): Extracting archive
  - Installing doctrine/event-manager (1.1.1): Extracting archive
  - Upgrading doctrine/cache (v1.6.2 => 1.10.2): Extracting archive
  - Upgrading doctrine/dbal (v2.5.13 => 2.10.4): Extracting archive
  - Upgrading doctrine/inflector (v1.2.0 => 2.0.3): Extracting archive
  - Upgrading doctrine/lexer (1.0.2 => 1.2.1): Extracting archive
  - Installing dragonmantank/cron-expression (v2.3.1): Extracting archive
  - Installing fzaninotto/faker (v1.9.2): Extracting archive
  - Installing symfony/polyfill-php80 (v1.22.0): Extracting archive
  - Upgrading symfony/polyfill-php72 (v1.19.0 => v1.22.0): Extracting archive
  - Upgrading symfony/polyfill-mbstring (v1.19.0 => v1.22.0): Extracting archive
  - Upgrading symfony/var-dumper (v3.4.46 => v4.4.18): Extracting archive
  - Installing symfony/service-contracts (v1.1.9): Extracting archive
  - Installing symfony/polyfill-php73 (v1.22.0): Extracting archive
  - Upgrading symfony/console (v3.4.46 => v4.4.18): Extracting archive
  - Upgrading nikic/php-parser (v4.10.2 => v4.10.4): Extracting archive
  - Upgrading psy/psysh (v0.9.12 => v0.10.6): Extracting archive
  - Installing phpoption/phpoption (1.7.5): Extracting archive
  - Upgrading vlucas/phpdotenv (v2.6.6 => v3.6.8): Extracting archive
  - Upgrading symfony/css-selector (v3.4.46 => v4.4.18): Extracting archive
  - Upgrading symfony/routing (v3.4.46 => v4.4.18): Extracting archive
  - Upgrading symfony/process (v3.4.46 => v4.4.18): Extracting archive
  - Upgrading symfony/polyfill-intl-normalizer (v1.19.0 => v1.22.0): Extracting archive
  - Upgrading symfony/polyfill-intl-idn (v1.19.0 => v1.22.0): Extracting archive
  - Installing symfony/mime (v4.4.18): Extracting archive
  - Upgrading symfony/http-foundation (v3.4.46 => v4.4.18): Extracting archive
  - Installing symfony/http-client-contracts (v1.1.10): Extracting archive
  - Installing symfony/event-dispatcher-contracts (v1.1.9): Extracting archive
  - Upgrading symfony/event-dispatcher (v3.4.46 => v4.4.18): Extracting archive
  - Upgrading symfony/debug (v3.4.46 => v4.4.18): Extracting archive
  - Installing symfony/error-handler (v4.4.18): Extracting archive
  - Upgrading symfony/http-kernel (v3.4.46 => v4.4.18): Extracting archive
  - Upgrading symfony/finder (v3.4.46 => v4.4.18): Extracting archive
  - Upgrading symfony/polyfill-iconv (v1.19.0 => v1.22.0): Extracting archive
  - Upgrading egulias/email-validator (2.1.24 => 2.1.25): Extracting archive
  - Upgrading swiftmailer/swiftmailer (v6.2.3 => v6.2.5): Extracting archive
  - Installing opis/closure (3.6.1): Extracting archive
  - Installing symfony/translation-contracts (v1.1.10): Extracting archive
  - Upgrading symfony/translation (v3.4.46 => v4.4.18): Extracting archive
  - Upgrading nesbot/carbon (1.39.1 => 2.43.0): Extracting archive
  - Upgrading monolog/monolog (1.25.5 => 2.2.0): Extracting archive
  - Installing league/commonmark (1.5.7): Extracting archive
  - Upgrading laravel/framework (v5.5.50 => v6.18.43): Extracting archive
  - Upgrading laravel/tinker (v1.0.10 => v2.4.2): Extracting archive
  - Upgrading league/csv (8.2.3 => 9.5.0): Extracting archive
  - Installing meyfa/phpunit-assert-gd (v2.0.0): Extracting archive
  - Installing hamcrest/hamcrest-php (v2.0.1): Extracting archive
  - Installing mockery/mockery (1.3.3): Extracting archive
  - Installing wikimedia/less.php (v2.0.0): Extracting archive
  - Upgrading twig/twig (v2.12.5 => v2.13.1): Extracting archive
  - Upgrading symfony/yaml (v3.4.46 => v3.4.47): Extracting archive
  - Installing scssphp/scssphp (v1.4.1): Extracting archive
  - Upgrading october/rain (v1.0.469 => v1.1.1): Extracting archive
  - Upgrading october/backend (v1.0.469 => v1.1.1): Extracting archive
  - Upgrading october/cms (v1.0.469 => v1.1.1): Extracting archive
  - Upgrading october/system (v1.0.469 => v1.1.1): Extracting archive
  - Installing php-parallel-lint/php-parallel-lint (v1.2.0): Extracting archive
  - Installing squizlabs/php_codesniffer (3.5.8): Extracting archive
75 package suggestions were added by new dependencies, use `composer suggest` to see details.
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
60 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> php artisan october:version
*** Detecting October CMS build...
*** Detected a modified version of October CMS build 470.
> php artisan package:discover
Discovered Package: jenssegers/date
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Package manifest generated successfully.

The server worked correctly and I got my route result with : localhost/produits

Then I activated CORS and now localhost/produits returns again :
image

from wn-cors-plugin.

rluders avatar rluders commented on June 18, 2024

OK. I definitely know what is the issue. But, I have no idea how to fix it.

It seems that the OctoberCMS rollback its version to not support Laravel 6, unless if you install and update the OctoberCMS using composer. So, it is causing all the issues, 'cause the plugin libraries don't support Laravel 5 anymore. I mean, it should, but, apparently 'cause of the way that Laravel manages its dependency when you install the plugin direct from the Marketplace... it tries to download the wrong dependency versions.

I can only advise you, for now, to recreate your project with composer and then, after update the OctoberCMS with the composer update command, tried to install the plugins again.

I don't see the advantage and migrate the plugin back to Laravel 5.5, once the support to Laravel 6 should be released in the next months.

from wn-cors-plugin.

Incremental92 avatar Incremental92 commented on June 18, 2024

Thanks for your feedback.
As I made my plugin with Builder, I don't know how to backup it and reinstall...
If you could rollback to 5.5 it could be fine ?

from wn-cors-plugin.

rluders avatar rluders commented on June 18, 2024

You can download an older version of the plugin from GitHub, just check the releases. I guess that the v1.0.3 should work with L5.5.

Sorry about it, but it all seems to happened 'cause OctoberCMS had a premature release of L6, then they decided to rollback to L5.5 - and now we have two possible Laravel versions out there.

About the Builder, if I'm not mistaken you could just create a new OctoberCMS project with Composer and update it via composer as well, then... you probably would be fine if you move your plugin folder, created by the Builder to the new project, also, installing the Builder there, and it can "find" your plugin.

Of course, that it will require some extra work and exploration, but it should be totally possible. I can't guide you on that, 'cause, as I said, it will require some exploration and understand of the possible error messages or issues that you may be ending up founding. But it should be possible, and should not be hard, just boring.

So, for now, I'll mark this issue as wontfix since I'm not planning to roll back the plugin release as the L6 update coming in the next close months. Hope you understand.

from wn-cors-plugin.

rluders avatar rluders commented on June 18, 2024

BTW... How to check if your OctoberCMS is using the L5.5 or L6 version? Easy.

  1. Check the installed.json folder from OctotberCMS vendor folder:
    image

  2. Open it and search for "laravel/framework"
    image

Done! Now you know which Laravel version your OctoberCMS is using. Keep in mind that it is possible to convert a non-composer OctoberCMS installation to a composer installation. So, you may not need to reinstall your OctoberCMS if you want to use the latest plugin version.

From the official documentation:
image

from wn-cors-plugin.

Incremental92 avatar Incremental92 commented on June 18, 2024

In vendor/composer/installed.json one of my sites contains :
"name": "laravel/framework", "version": "v6.18.43", "version_normalized": "6.18.43.0",
and another :
"name": "laravel/framework", "version": "v5.5.50", "version_normalized": "5.5.50.0",

from wn-cors-plugin.

Incremental92 avatar Incremental92 commented on June 18, 2024

On the v5.5 site I installed the 1.0.3 version.
Now backend is stucked with
image

from wn-cors-plugin.

Incremental92 avatar Incremental92 commented on June 18, 2024

At the moment, I successfully installed the CORS plugin by Offline on my v5.5 site
... and on the v6.18 it works with CORS uninstalled.... STRANGE !

from wn-cors-plugin.

rluders avatar rluders commented on June 18, 2024

Yep, I'll release a review release this weekend, just to make sure that everything is working for the Laravel 6 version. It should, but I want to make sure, and also want to patch some improvements to it.

from wn-cors-plugin.

Incremental92 avatar Incremental92 commented on June 18, 2024

Super ! ;-)

from wn-cors-plugin.

Incremental92 avatar Incremental92 commented on June 18, 2024

Hello Ricardo, do you have any news of the October side ?
I'm really stuck now and consider to move to another framework like Strapi which has all this stuff by design...

from wn-cors-plugin.

rluders avatar rluders commented on June 18, 2024

Hello.

Not really, I'm really busy with others projects right now. I didn't had the time to explore it anymore.
But at the same time didn't get any other complain about it. Since I always test it locally before pushing any release, and the issue was 'cause the OctoberCMS multi-laravel version, if they change it to Laravel 6 right now, it may end up working without any interaction from my part.

from wn-cors-plugin.

Incremental92 avatar Incremental92 commented on June 18, 2024

Ahoj Ricardo !
I hope you'll fork it also for Winter CMS ;-)

from wn-cors-plugin.

Related Issues (3)

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.