Comments (7)
What's the error message?
https://github.com/davejamesmiller/laravel-breadcrumbs/blob/master/CONTRIBUTING.rst
from laravel-breadcrumbs.
Sorry for not providing the necessary details.
Apache log says:
[Thu Mar 19 17:09:29.843727 2015] [mpm_winnt:notice] [pid 4372:tid 388] AH00428: Parent: child process 3944 exited with status 3221225725 -- Restarting.
322..725 seems to be a stack overflow error.
PHP log says nothing.
The above description will not reproduce the error, it was a false analysis on my end.
The real issue seems to be when you try to register multiple breadcrumb entries with the same name. I had one registration left in another file and ended up registering two breadcrumb entries for the name "admin.job.index".
I don't quite get what goes wrong though as the register method should simply overwrite the prior entry, no?
public function register($name, $callback)
{
$this->callbacks[$name] = $callback;
}
/src/Manager.php: 20
Once you catch the case where the desired name has already been taken you can throw an exception and exit before the crash of Apache.
if (isset($this->callbacks[$name]))
throw new Exception("Entry name \"{$name}\" has already been assigned."
I've not been able to unset or reset the prior registered one. I would guess "simply overwrite the previous assignment" would be the desired functionality here but at least on my machine that won't work.
from laravel-breadcrumbs.
I can't see any reason that defining a breadcrumb twice would cause a problem - as you say it should just overwrite it. Are you sure you're not calling it in a way that would cause an infinite loop - e.g. parent() calling itself?
from laravel-breadcrumbs.
🙈
Breadcrumbs::register( 'admin.job.index', function( $breadcrumbs ) {
$breadcrumbs->push( 'Overview', route( 'admin.job.index' ) );
} );
Breadcrumbs::register( 'admin.job.index', function( $breadcrumbs ) {
// YOLO
$breadcrumbs->parent( 'admin.job.index' );
$breadcrumbs->push( 'Overview', route( 'admin.job.index' ) );
} );
Yup, reproduced it like so - I guess that was the original code that caused it.
Sorry for the mess.
from laravel-breadcrumbs.
:)
from laravel-breadcrumbs.
BTW You might want to look at your PHP setup, because on most systems that would cause a "maximum nesting level reached" PHP error, output to the screen or log, not a stack overflow / cryptic error.
from laravel-breadcrumbs.
Yes thanks for the heads up, I am currently looking into that, bugged me as well :)
from laravel-breadcrumbs.
Related Issues (20)
- Dynamic breadcrumb - Trying to get property of non-object HOT 1
- Error logging
- Feature Request: Be able to pass the register name to the call back function HOT 1
- After execute the publish command, the config file not appear HOT 1
- json-ld Unspecified Type HOT 2
- Error en Ubuntu HOT 2
- Same errors with $breadcrumbs HOT 2
- Generate breadcrumbs for tabbed content HOT 4
- Wrong Readme Method parameter reference
- Method for does not exist. HOT 2
- can't get post category HOT 12
- How to pass the value to the bread crumbs with my admin panel? HOT 1
- It would be nice if I could put icons like this: HOT 1
- Laravel 5.7 Released HOT 1
- Add Laravel 5.7 support HOT 1
- installed the package and got Class 'Breadcrumbs' not found error HOT 2
- Feature Request UIKit breadcrumbs HOT 6
- Does this package even works??? HOT 3
- "Home" breadcrumb shows up twice, unable to remove it HOT 3
- breadcrumb 4 levels HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-breadcrumbs.