Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome DevTools panel empty with Slim #5

Closed
risingphoenix opened this issue Oct 10, 2013 · 3 comments
Closed

Chrome DevTools panel empty with Slim #5

risingphoenix opened this issue Oct 10, 2013 · 3 comments

Comments

@risingphoenix
Copy link

Hi
I tried to install clockwork with slim 2 and the result is that I do not see anything in the Chrome DevTools panel.
I saw the issue #3 and I tried to the route http://your-host/__clockwork/ID, but actually I do not see anything, even though I see in the folder configured the json files named with the correct ID that is passed into the headers of the page.

I've done something wrong? I have to apply some particular rule inside my .htaccess?

here's my .htaccess configuration

<IfModule mod_rewrite.c>
    Options -MultiViews
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>
@risingphoenix
Copy link
Author

Maybe I found the problem...

vendor/itsgoingd/clockwork/Clockwork/Support/Slim/ClockworkMiddleware.php

the RegularExpression recovers only the first 2 numbers with splitted by the dot and I think that the need is for 3 number for the ID:

So I changed the line 38 from:
if (preg_match('#/__clockwork(/(?<id>\d+\.\d+))?#', $this->app->request()->getPathInfo(), $matches))
to:
if (preg_match('#/__clockwork(/(?<id>\d+\.\d+.\d+))?#', $this->app->request()->getPathInfo(), $matches))

@itsgoingd
Copy link
Owner

Fixed in dev-master, Slim support is currently lacking as I work mostly with Laravel these days, I want to definitively improve it in future versions though. Thanks for the report!

@risingphoenix
Copy link
Author

Btw all of my compliments! This is really awesome 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants