Closed craigh closed 10 years ago
if I click "cancel" I can go on, but if I click 'Yes' then it tries to open http://127.0.0.1/core.git/src/index.php/_profiler/53a128
and fails with The requested URL cannot be found
/cc @drak
It works for me, did you forget to edit your .htaccess file? (I had to adjust "RewriteBase").
no, I did not edit my .htaccess file. In the past, I don't think this was required for shorturls. can the existing one in the repo be adjusted so this is not required?
No I don't think so, and you always had to edit it IIRC, if you did not install Zikula on server root but in a subfolder. And no, it can't be adjusted, as it is a matter of the subfolder you installed Zikula in.
I'm quite sure shorturls work regardless of install location without adjustments to the .htaccess file. (just tested a bit to be sure). It is only the profiler that is broken currently. If the file must be adjusted and cannot be automatically done somehow, can this be documented somewhere? for slow learners like myself, this type of thing requires some handholding. with sufficient documentation, I think this ticket could be closed.
is it possible this could somehow be related to the also ongoing discussion about routing?
I'm not sure, I personally hate .htaccess stuff. So I can't document anything here.
you could at least tell me how you adjusted your own install :stuck_out_tongue_winking_eye:
My Zikula url looks like so:
http://localhost/~cmfcmf/137/src/index.php
and RewriteBase like so:
RewriteBase /~cmfcmf/137/src
changing my htaccess file doesn't solve this problem. :frowning:
interestingly, short urls ALSO breaks the fix you supplied (months ago) for the issue with doctrine_extensions
service not existing:
Whoops, looks like something went wrong.
1/1InvalidArgumentException: The service definition "doctrine_extensions" does not exist. in /Applications/MAMP/htdocs/core.git/src/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php line 874 at ContainerBuilder->getDefinition('doctrine_extensions') in /Applications/MAMP/htdocs/core.git/src/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php line 482 at ContainerBuilder->get('doctrine_extensions', '1') in /Applications/MAMP/htdocs/core.git/src/lib/legacy/Zikula/ServiceManager.php line 117 at Zikula_ServiceManager->get('doctrine_extensions') in /Applications/MAMP/htdocs/core.git/src/lib/util/ServiceUtil.php line 72 at ServiceUtil::getService('doctrine_extensions') in /Applications/MAMP/htdocs/modules/zkmod/Tag/bootstrap.php line 11 at include_once('/Applications/MAMP/htdocs/modules/zkmod/Tag/bootstrap.php') in /Applications/MAMP/htdocs/core.git/src/lib/util/ModUtil.php line 1723 at ModUtil::initOOModule('Tag') in /Applications/MAMP/htdocs/core.git/src/lib/util/ModUtil.php line 812 at ModUtil::loadGeneric('Tag', 'user', false, true) in /Applications/MAMP/htdocs/core.git/src/lib/util/ModUtil.php line 747 at ModUtil::loadApi('Tag', 'user') at call_user_func_array('ModUtil::loadApi', array('Tag', 'user')) in /Applications/MAMP/htdocs/core.git/src/lib/util/ModUtil.php line 1061 at ModUtil::exec('Tag', 'user', 'decodeurl', array('vars' => array('tag', '')), true, null) in /Applications/MAMP/htdocs/core.git/src/lib/util/ModUtil.php line 1228 at ModUtil::apiFunc('Tag', 'user', 'decodeurl', array('vars' => array('tag', ''))) in /Applications/MAMP/htdocs/core.git/src/lib/util/System.php line 809 at System::queryStringDecode(object(Zikula_Request_Http)) in /Applications/MAMP/htdocs/core.git/src/lib/legacy/Zikula/Core.php line 482
I am using a Mac (Open BSD based OS) and MAMP. I also get the same result in testing the issue at the ntq server (http://ntq.zikula.org/core/src/) which I assume is running some kind of linux but can't figure out what. (notice it is also running in a subdir - but didn't try changing the htaccess file there)
I got it working editing the RewriteBase
to /zikula/1.3 (my symlink to
src)
but if I do strip the entrypoint it fails. weird
oh yes, I've had 'strip entry point' enabled every time I've tested. @cmfcmf did you?
No. Then this is the "real" bug. Strip Entrypoint does not work.
great! now you know what to fix :stuck_out_tongue_closed_eyes: :grinning:
ok -
with Enable directory-based short URLs = YES
and Strip entry point from directory-based URLs = NO
, most everything works correctly. The only exception is http://127.0.0.1/core.git/src/
produces the popup error (in OP) - when clicking on "OK" from the popup window above it goes to http://127.0.0.1/core.git/src/_profiler/0c019b
and produces The requested URL cannot be found
. But http://127.0.0.1/core.git/src/index.php
does not produce the error. All other urls (e.g. http://127.0.0.1/core.git/src/index.php/forums/index
and http://127.0.0.1/core.git/src/index.php?module=settings&type=admin&func=modifyconfig
) work as expected.
with Enable directory-based short URLs = YES
and Strip entry point from directory-based URLs = YES
,
Admin urls like http://127.0.0.1/core.git/src/index.php?module=settings&type=admin&func=modifyconfig
result in the popup error and clicking the "OK" button goes to http://127.0.0.1/core.git/src/index.php/_profiler/28aef1
and produces The requested URL cannot be found
. http://127.0.0.1/core.git/src/
works correctly however and urls like http://127.0.0.1/core.git/src/forums/index
work as expected.
hopefully that makes enough sense to you to enable a quick fix. :smile:
I should mention all that is with the original .htaccess
file - no modifications for local environment.
After you make a change in the Settings mode (to enable short URLs and strip the entry point), clear the "app/cache" directory.
Then, see if it regenerates the cache with the correct paths for the profiler.
Specifically, purge these cache files:
appDevUrlGenerator.php appDevUrlMatcher.php
@shefik As far as I see this setting is completely ignored by the Symfony Routing for the time being.
@cmfcmf Does that mean purging those cache files work for you in the meantime?
There are certain limitations because our entrypoint is in the wrong place (Zikula makes assumptions based on the location of index.php which are not the same as Symfony). The old and new systems are probably not compatible in this respect so there may be some rough edges, probably not worth worrying about because it's just transitional.
For me this issue is solved.
I'm quite sure that this is not solved at the highest level and I believe that is why this ticket was still open. The entry point issue has to do with the routing refactoring @cmfcmf
re-opening with the purpose of allowing Christian to close if it is solved.
@craigh I cannot reproduce this anymore. It seems to be fixed by magic. :star: :leaves: :rabbit: I'm closing this now, but feel free to reopen if you still experience the problems.
(original title: _shorturls breaks web profiler_)
I turned on shorturls and in the admin area of the site, I continually get a popup error that says:
/cc @cmfcmf
edited: The issue has been identified as a problem with the
strip entry point
setting.