On multilocale unable to access /admin

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
snicto
Posts: 37
Joined: 12 Oct 2022, 14:00

Re: On multilocale unable to access /admin

Post by snicto » 06 Dec 2022, 13:43

The error also appears on a clean install of Aimeos https://github.com/aimeos/aimeos#installation

The only change done to the new install is set 'engine' => 'InnoDB' for MySQL in config/database.php

Code: Select all

aimeos/ai-admin-graphql            2022.10.3      Aimeos Admin GraphQL API extension
aimeos/ai-admin-jqadm              2022.10.3      Aimeos VueJS+Bootstrap admin backend
aimeos/ai-admin-jsonadm            2022.10.1      Aimeos JSON admin API for backend
aimeos/ai-client-html              2022.10.4      Aimeos standard HTML frontend
aimeos/ai-client-jsonapi           2022.10.2      Aimeos frontend JSON REST API
aimeos/ai-cms-grapesjs             2022.10.4      Aimeos GrapesJS CMS extension
aimeos/ai-controller-frontend      2022.10.4      Aimeos business controller logic for frontend
aimeos/ai-controller-jobs          2022.10.4      Aimeos job controllers for long running tasks
aimeos/ai-laravel                  2022.10.4      Laravel adapter for Aimeos e-commerce integration
aimeos/aimeos-base                 2022.10.2      Aimeos base layer for abstracting from host environments
aimeos/aimeos-core                 2022.10.6      Full-featured e-commerce components for high performance online ...
aimeos/aimeos-laravel              2022.10.3      Professional, full-featured and high performance Laravel e-comme...
aimeos/macro                       1.0.0          Dynamically extend objects by custom methods
aimeos/map                         3.3.0          Easy and elegant handling of PHP arrays as array-like collection...
aimeos/upscheme                    0.8.4          Database schema upgrades made easy
brick/math                         0.10.2         Arbitrary-precision arithmetic library
dflydev/dot-access-data            v3.0.2         Given a deep data structure, access data by dot notation.
doctrine/cache                     2.2.0          PHP Doctrine Cache library is a popular cache implementation tha...
doctrine/dbal                      3.5.1          Powerful PHP database abstraction layer (DBAL) with many feature...
doctrine/deprecations              v1.0.0         A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-...
doctrine/event-manager             2.0.0          The Doctrine Event Manager is a simple PHP event system that was...
doctrine/inflector                 2.0.6          PHP Doctrine Inflector is a small library that can perform strin...
doctrine/instantiator              1.4.1          A small, lightweight utility to instantiate objects in PHP witho...
doctrine/lexer                     1.2.3          PHP Doctrine Lexer parser library that can be used in Top-Down, ...
dragonmantank/cron-expression      v3.3.2         CRON for PHP: Calculate the next or previous run date and determ...
egulias/email-validator            3.2.1          A library for validating emails against several RFCs
enshrined/svg-sanitize             0.15.4         An SVG sanitizer for PHP
fakerphp/faker                     v1.20.0        Faker is a PHP library that generates fake data for you.
filp/whoops                        2.14.6         php error handling for cool kids
fruitcake/php-cors                 v1.2.0         Cross-origin resource sharing library for the Symfony HttpFounda...
graham-campbell/result-type        v1.1.0         An Implementation Of The Result Type
guzzlehttp/guzzle                  7.5.0          Guzzle is a PHP HTTP client library
guzzlehttp/promises                1.5.2          Guzzle promises library
guzzlehttp/psr7                    2.4.3          PSR-7 message implementation that also provides common utility m...
hamcrest/hamcrest-php              v2.0.1         This is the PHP port of Hamcrest Matchers
laminas/laminas-diactoros          2.22.0         PSR HTTP Message implementations
laravel/breeze                     v1.15.3        Minimal Laravel authentication scaffolding with Blade and Tailwind.
laravel/framework                  v9.42.2        The Laravel Framework.
laravel/sail                       v1.16.3        Docker files for running a basic Laravel application.
laravel/sanctum                    v2.15.1        Laravel Sanctum provides a featherweight authentication system f...
laravel/serializable-closure       v1.2.2         Laravel Serializable Closure provides an easy and secure way to ...
laravel/tinker                     v2.7.3         Powerful REPL for the Laravel framework.
league/commonmark                  2.3.7          Highly-extensible PHP Markdown parser which fully supports the C...
league/config                      v1.1.1         Define configuration arrays with strict schemas and access value...
league/flysystem                   3.11.0         File storage abstraction for PHP
league/mime-type-detection         1.11.0         Mime-type detection for Flysystem
mockery/mockery                    1.5.1          Mockery is a simple yet flexible PHP mock object framework
monolog/monolog                    2.8.0          Sends your logs to files, sockets, inboxes, databases and variou...
myclabs/deep-copy                  1.11.0         Create deep copies (clones) of your objects
nesbot/carbon                      2.64.0         An API extension for DateTime that supports 281 different langua...
nette/schema                       v1.2.3         📐 Nette Schema: validating data structures against a given Sc...
nette/utils                        v3.2.8         🛠  Nette Utils: lightweight utilities for string & array mani...
nikic/php-parser                   v4.15.2        A PHP parser written in PHP
nunomaduro/collision               v6.3.1         Cli error handling for console/command-line PHP applications.
nunomaduro/termwind                v1.14.2        Its like Tailwind CSS, but for the console.
nyholm/psr7                        1.5.1          A fast PHP7 implementation of PSR-7
phar-io/manifest                   2.0.3          Component for reading phar.io manifest information from a PHP Ar...
phar-io/version                    3.2.1          Library for handling version information and constraints
php-http/message-factory           v1.0.2         Factory interfaces for PSR-7 HTTP Message
phpoption/phpoption                1.9.0          Option Type for PHP
phpunit/php-code-coverage          9.2.19         Library that provides collection, processing, and rendering func...
phpunit/php-file-iterator          3.0.6          FilterIterator implementation that filters files based on a list...
phpunit/php-invoker                3.1.1          Invoke callables with a timeout
phpunit/php-text-template          2.0.4          Simple template engine.
phpunit/php-timer                  5.0.3          Utility class for timing
phpunit/phpunit                    9.5.26         The PHP Unit Testing framework.
psr/cache                          3.0.0          Common interface for caching libraries
psr/container                      2.0.2          Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher               1.0.0          Standard interfaces for event handling.
psr/http-client                    1.0.1          Common interface for HTTP clients
psr/http-factory                   1.0.1          Common interfaces for PSR-7 HTTP message factories
psr/http-message                   1.0.1          Common interface for HTTP messages
psr/log                            3.0.0          Common interface for logging libraries
psr/simple-cache                   3.0.0          Common interfaces for simple caching
psy/psysh                          v0.11.9        An interactive shell for modern PHP.
ralouphie/getallheaders            3.0.3          A polyfill for getallheaders.
ramsey/collection                  1.2.2          A PHP library for representing and manipulating collections.
ramsey/uuid                        4.6.0          A PHP library for generating and working with universally unique...
sebastian/cli-parser               1.0.1          Library for parsing CLI options
sebastian/code-unit                1.0.8          Collection of value objects that represent the PHP code units
sebastian/code-unit-reverse-lookup 2.0.3          Looks up which function or method a line of code belongs to
sebastian/comparator               4.0.8          Provides the functionality to compare PHP values for equality
sebastian/complexity               2.0.2          Library for calculating the complexity of PHP code units
sebastian/diff                     4.0.4          Diff implementation
sebastian/environment              5.1.4          Provides functionality to handle HHVM/PHP environments
sebastian/exporter                 4.0.5          Provides the functionality to export PHP variables for visualiza...
sebastian/global-state             5.0.5          Snapshotting of global state
sebastian/lines-of-code            1.0.3          Library for counting the lines of code in PHP source code
sebastian/object-enumerator        4.0.4          Traverses array structures and object graphs to enumerate all re...
sebastian/object-reflector         2.0.4          Allows reflection of object attributes, including inherited and ...
sebastian/recursion-context        4.0.4          Provides functionality to recursively process PHP variables
sebastian/resource-operations      3.0.3          Provides a list of PHP built-in functions that operate on resources
sebastian/type                     3.2.0          Collection of value objects that represent the types of the PHP ...
sebastian/version                  3.0.2          Library that helps with managing the version number of Git-hoste...
spatie/backtrace                   1.2.1          A better backtrace
spatie/flare-client-php            1.3.1          Send PHP errors to Flare
spatie/ignition                    1.4.1          A beautiful error page for PHP applications.
spatie/laravel-ignition            1.6.1          A beautiful error page for Laravel applications.
symfony/console                    v6.2.0         Eases the creation of beautiful and testable command line interf...
symfony/css-selector               v6.2.0         Converts CSS selectors to XPath expressions
symfony/deprecation-contracts      v3.1.1         A generic function and convention to trigger deprecation notices
symfony/error-handler              v6.2.0         Provides tools to manage errors and ease debugging PHP code
symfony/event-dispatcher           v6.2.0         Provides tools that allow your application components to communi...
symfony/event-dispatcher-contracts v3.1.1         Generic abstractions related to dispatching event
symfony/finder                     v6.2.0         Finds files and directories via an intuitive fluent interface
symfony/http-foundation            v6.2.0         Defines an object-oriented layer for the HTTP specification
symfony/http-kernel                v6.2.0         Provides a structured process for converting a Request into a Re...
symfony/mailer                     v6.2.0         Helps sending emails
symfony/mime                       v6.2.0         Allows manipulating MIME messages
symfony/polyfill-ctype             v1.27.0        Symfony polyfill for ctype functions
symfony/polyfill-intl-grapheme     v1.27.0        Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-idn          v1.27.0        Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer   v1.27.0        Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring          v1.27.0        Symfony polyfill for the Mbstring extension
symfony/polyfill-php72             v1.27.0        Symfony polyfill backporting some PHP 7.2+ features to lower PHP...
symfony/polyfill-php80             v1.27.0        Symfony polyfill backporting some PHP 8.0+ features to lower PHP...
symfony/polyfill-php81             v1.27.0        Symfony polyfill backporting some PHP 8.1+ features to lower PHP...
symfony/polyfill-uuid              v1.27.0        Symfony polyfill for uuid functions
symfony/process                    v6.2.0         Executes commands in sub-processes
symfony/psr-http-message-bridge    v2.1.4         PSR HTTP message bridge
symfony/routing                    v6.2.0         Maps an HTTP request to a set of configuration variables
symfony/service-contracts          v3.1.1         Generic abstractions related to writing services
symfony/string                     v6.2.0         Provides an object-oriented API to strings and deals with bytes,...
symfony/translation                v6.2.0         Provides tools to internationalize your application
symfony/translation-contracts      v3.1.1         Generic abstractions related to translation
symfony/uid                        v6.2.0         Provides an object-oriented API to generate and represent UIDs
symfony/var-dumper                 v6.2.0         Provides mechanisms for walking through any arbitrary PHP variable
tecnickcom/tcpdf                   6.6.0          TCPDF is a PHP class for generating PDF documents and barcodes.
theseer/tokenizer                  1.2.1          A small library for converting tokenized PHP source code into XM...
tijsverkoyen/css-to-inline-styles  2.2.5          CssToInlineStyles is a class that enables you to convert HTML-pa...
vlucas/phpdotenv                   v5.5.0         Loads environment variables from `.env` to `getenv()`, `$_ENV` a...
voku/portable-ascii                2.0.1          Portable ASCII library - performance optimized (ascii) string fu...
webmozart/assert                   1.11.0         Assertions to validate method input/output with nice error messa...
webonyx/graphql-php                v15.0.0-beta.1 A PHP port of GraphQL reference implementation

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: On multilocale unable to access /admin

Post by aimeos » 07 Dec 2022, 11:41

You are right, the problem also occurs in a standard setup and the problem is the anonymous /admin added in ./routes/web.php. If you remove that lines, it works without problems:
https://github.com/aimeos/aimeos/blob/m ... hp#L25-L27
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

snicto
Posts: 37
Joined: 12 Oct 2022, 14:00

Re: On multilocale unable to access /admin

Post by snicto » 07 Dec 2022, 14:04

Yep, seems to have fixed the issue.

tblanchard
Posts: 7
Joined: 02 Dec 2022, 00:09

Re: On multilocale unable to access /admin

Post by tblanchard » 09 Dec 2022, 00:25

I have just installed this today - having same problem.

Unable to sign in, I *think* I have the correct admin password. Is there a command line tool to set it for a user to be sure?

Accessing /en/admin (/admin is 404) I can enter passwords all day but it takes none of them and I'm pretty dang sure the password is 'password' as I copied the hash from Test user created when database was seeded.

Stuck. :-(

Edit: Using PostgreSQL in case it matters.

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: On multilocale unable to access /admin

Post by aimeos » 09 Dec 2022, 08:05

Use this command to reset passwords:

Code: Select all

php artisan aimeos:account --super your@email.org
If you've installed the latest version (aimeos/aimeos:2022.10.3, use "composer show" to find out), Aimeos admin backend is available at /admin even in multi-locale setups.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply