quickapps / cms

Modular CMS powered by CakePHP
GNU General Public License v3.0
164 stars 69 forks source link

Error: [Cake\Routing\Exception\DuplicateNamedRouteException] #160

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello Developers,

I have unfortunately a little problem right after the installation of the latest version of QuickApps. I installed with Composer and the installation was successful. The whole is on a subdomain under http://quickapps.wpzweinull.ch and I forwarded this subdomain to /webroot.

That's right or not ?!

In frontend I can not access the site but. In the error logs I find error messages that look like this.

2016-08-30 08:28:28 Error: [Cake\Routing\Exception\DuplicateNamedRouteException] A route named "content_details" has already been connected to "/:content_type_slug/:content_slug.html". Request URL: /

Maybe you can help me somehow.

Thanks in advance, Alexander

botchris commented 7 years ago

Hi Alex,

you should enable apache's mod_rewrite and then point your subdomain to the root of quickapps installation, that is that directory holding the webroot directory and not webroot itself.

ghost commented 7 years ago

Hi Christopher,

Unfortunately, the error persists. The .htaccess from the root of the installation looks as follows. Is that correct?

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule    ^$    webroot/    [L]
    RewriteRule    (.*) webroot/$1    [L]
</IfModule>
botchris commented 7 years ago

Well, for some reason your installation is defining twice some url routes, we would need more information in order to reproduce this error:


Also check that your tmp directory has writing permissions.

ghost commented 7 years ago

Yes, a pity I think that here and your desires.

php composer.phar info -i
You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages.
aura/installer-default          1.0.0              Installs Aura packages u...
aura/intl                       1.1.1              The Aura.Intl package pr...
cakephp/cakephp                 3.3.3              The CakePHP framework
cakephp/chronos                 1.0.0              A simple API extension f...
cakephp/plugin-installer        0.0.15             A composer installer for...
doctrine/annotations            v1.2.7             Docblock Annotations Parser
doctrine/lexer                  v1.0.1             Base library for a lexer...
goaop/framework                 2.0.0              Framework for aspect-ori...
goaop/parser-reflection         1.0.2              Provides reflection info...
jakubledl/dissect               v1.0.1             Lexing and parsing in pu...
mobiledetect/mobiledetectlib    2.8.22             Mobile_Detect is a light...
nikic/php-parser                v2.1.0             A PHP parser written in PHP
psr/http-message                1.0.1              Common interface for HTT...
psr/log                         1.0.0              Common interface for log...
quickapps-plugins/block         dev-master 3bdf2d6 Allows users to create b...
quickapps-plugins/bootstrap     dev-master d50526f Provides Twitter Bootstr...
quickapps-plugins/captcha       dev-master afcd671 Provides CAPTCHA API, an...
quickapps-plugins/cms           dev-master 213b36f QuickAppsCMS core librar...
quickapps-plugins/comment       dev-master 6a55735 Allows users to comment ...
quickapps-plugins/content       dev-master c2fecdc Allows content to be sub...
quickapps-plugins/eav           dev-master 17b0dc5 Provides EAV (Entity-Att...
quickapps-plugins/field         dev-master 7a1c75b Field API to add fields ...
quickapps-plugins/installer     dev-master b3b78c5 Handles (un)installation...
quickapps-plugins/jquery        dev-master c78bde8 Provides jQuery assets a...
quickapps-plugins/locale        dev-master 437d486 Adds language handling f...
quickapps-plugins/media-manager dev-master 5201c60 Allows you to upload, ma...
quickapps-plugins/menu          dev-master 2bdd354 Allows administrators to...
quickapps-plugins/search        dev-master 3029a99 Search API for QuickApps...
quickapps-plugins/system        dev-master aa62d6a QuickAppsCMS core plugin...
quickapps-plugins/taxonomy      dev-master 807a220 Enables the categorizati...
quickapps-plugins/user          dev-master 240f6e6 Used by QuickAppsCMS to ...
quickapps-plugins/wysiwyg       dev-master 862ecc5 Wysiwyg editor for texta...
quickapps-themes/backend-theme  dev-master 6e6907e QuickAppsCMS’s default...
quickapps-themes/frontend-theme dev-master d4f6e7b QuickAppsCMS’s default...
zendframework/zend-diactoros    1.3.6              PSR HTTP Message impleme...
2016-09-10 18:33:43 Error: [Cake\Routing\Exception\DuplicateNamedRouteException] A route named "content_details" has already been connected to "/:content_type_slug/:content_slug.html".
Request URL: /
Client IP: xxxxxxxxx
Stack Trace:
#0 /www/htdocs/xxxxx/quickapps.wpzweinull.ch/vendor/cakephp/cakephp/src/Routing/RouteBuilder.php(473): Cake\Routing\RouteCollection->add(Object(Cake\Routing\Route\InflectedRoute), Array)
#1 /www/htdocs/xxxxxx/quickapps.wpzweinull.ch/vendor/cakephp/cakephp/src/Routing/Router.php(206): Cake\Routing\RouteBuilder->connect('/:locale/:conte...', Array, Array)
#2 /www/htdocs/xxxxxx/quickapps.wpzweinull.ch/vendor/cakephp/cakephp/src/Routing/RouteBuilder.php(671): Cake\Routing\Router::Cake\Routing\{closure}(Object(Cake\Routing\RouteBuilder))
#3 /www/htdocs/xxxxxx/quickapps.wpzweinull.ch/vendor/cakephp/cakephp/src/Routing/Router.php(903): Cake\Routing\RouteBuilder->scope('/', Object(Closure), NULL)
#4 /www/htdocs/xxxxxx/quickapps.wpzweinull.ch/vendor/cakephp/cakephp/src/Routing/Router.php(207): Cake\Routing\Router::scope('/', Object(Closure))
#5 /www/htdocs/xxxxxx/quickapps.wpzweinull.ch/vendor/quickapps-plugins/cms/config/routes_site.php(77): Cake\Routing\Router::connect('/:locale/:conte...', Array, Array)
#6 /www/htdocs/xxxxxx/quickapps.wpzweinull.ch/vendor/quickapps-plugins/cms/config/routes.php(18): require_once('/www/htdocs/w01...')
#7 /www/htdocs/xxxxxxx/quickapps.wpzweinull.ch/vendor/cakephp/cakephp/src/Routing/Router.php(994): include('/www/htdocs/w01...')
#8 /www/htdocs/xxxxxx/quickapps.wpzweinull.ch/vendor/cakephp/cakephp/src/Routing/Router.php(341): Cake\Routing\Router::_loadRoutes()
#9 /www/htdocs/xxxxxx/quickapps.wpzweinull.ch/vendor/cakephp/cakephp/src/Routing/Filter/RoutingFilter.php(57): Cake\Routing\Router::parse(false, 'GET')
#10 /www/htdocs/xxxxxx/quickapps.wpzweinull.ch/vendor/quickapps-plugins/cms/src/Routing/Filter/LanguageFilter.php(73): Cake\Routing\Filter\RoutingFilter->beforeDispatch(Object(Cake\Event\Event))
#11 /www/htdocs/xxxxxx/quickapps.wpzweinull.ch/vendor/cakephp/cakephp/src/Routing/DispatcherFilter.php(144): CMS\Routing\Filter\LanguageFilter->beforeDispatch(Object(Cake\Event\Event))
#12 /www/htdocs/xxxxxx/quickapps.wpzweinull.ch/vendor/cakephp/cakephp/src/Event/EventManager.php(425): Cake\Routing\DispatcherFilter->handle(Object(Cake\Event\Event), Object(Cake\Network\Request), Object(Cake\Network\Response))
#13 /www/htdocs/xxxxxx/quickapps.wpzweinull.ch/vendor/cakephp/cakephp/src/Event/EventManager.php(386): Cake\Event\EventManager->_callListener(Array, Object(Cake\Event\Event))
#14 /www/htdocs/xxxxxx/quickapps.wpzweinull.ch/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php(78): Cake\Event\EventManager->dispatch(Object(Cake\Event\Event))
#15 /www/htdocs/xxxxxx/quickapps.wpzweinull.ch/vendor/cakephp/cakephp/src/Http/ActionDispatcher.php(83): Cake\Http\ActionDispatcher->dispatchEvent('Dispatcher.befo...', Array)
#16 /www/htdocs/xxxxx/quickapps.wpzweinull.ch/vendor/cakephp/cakephp/src/Routing/Dispatcher.php(62): Cake\Http\ActionDispatcher->dispatch(Object(Cake\Network\Request), Object(Cake\Network\Response))
#17 /www/htdocs/xxxxx/quickapps.wpzweinull.ch/webroot/index.php(37): Cake\Routing\Dispatcher->dispatch(Object(Cake\Network\Request), Object(Cake\Network\Response))
#18 {main}
botchris commented 7 years ago

This commit 2d1fa381c20a4072b4c60d9294a670485f0bdcde should solve the problem, you can update your installation using composer as follow:

$ composer clear-cache
$ composer update

please let us know if is now working so we can close this ticket.

best regards!

ghost commented 7 years ago

Now I have to realize it. I had to reinstall QA namely. Updating of Composers and the plugin "cms" was not successful.

But that's good to know, because the Composer QA installation works properly. Now my new QA website is under http://quickapps.wpzweinull.ch/blog

You can now close this issue and thank you for your assistance, which brought me new ideas :)