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

Getting 404 not to working view upon installing pingpong-labs admin #17

Closed
techxaidz opened this issue Jan 10, 2015 · 6 comments
Closed

Comments

@techxaidz
Copy link

Hi there, thankyou for your nice package.
I'm new to laravel and i'm currently experiencing difficulty in debugging this problem.
I have some Views already functioning and have routes properly configured but when i install your package, something wrong is happening and it throws NotFoundHttpException.
As I've reviewed the error log, it shows that it is thrown by your showArticle() method at SiteController but i cannot see a trace or where it was been called in the code or in my routes neither. i guess my routes had been overwritten by your package.

Here's the error log:
error laravel

I hope you can point to me where do this error comes from.

@techxaidz
Copy link
Author

i've already traced who calls the function showArticle( ) at SiteController.
it is the RoutesObserver class,

error laravel
Can someone explain to me what RoutesObserver class' do? And why it is called instead of my own route?

@arsfeld
Copy link

arsfeld commented Jan 11, 2015

According to the documentation, you need to call Event::fire('admin::routes'); to add the PingPong Admin's routes to your application.

But that's not what really happens, because in the code it's actually calling that anyway when the extension is registered. And PingPong Admins's routes catch all root url's because of the RoutesObserver you pointed out.

So, this is a pretty nasty bug in this package and the way I solved it was making a private fork of this and removing the line in AdminServideProvider.php@95.
Hope it helps!

@gravitano
Copy link
Member

@techxaidz : You have to update the post.permalink option in admin interface, for example : post/{slug}.

@techxaidz
Copy link
Author

thanks for the fast responses there. i guess i need to make a private fork also,

@gravitano : what does the post.permalink actually do? what do i replace to that code? can you give a little more spoonfeed-like example?

sorry for i am a newbie

@arsfeld
Copy link

arsfeld commented Jan 15, 2015

@gravitano I suggest you put that in the documentation (and remove the part of the events in the routes file), it would have saved a lot of time for me

@techxaidz
Copy link
Author

@arsfeld : i tried what you suggested and it worked! looking forward for a proper solution / documentation regarding this problem.

thankyou

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

3 participants