Comments (26)
Hi,
I don't know your website but do you use ajax to change your page after login ?
from apybreadcrumbtrailbundle.
No i don't use ajax, maybe i'm doing something wrong in my test but i don't know what
from apybreadcrumbtrailbundle.
Maybe the breadcrumbs are not visible but exist when you browsing pages.
How do you test it with the functional text ?
from apybreadcrumbtrailbundle.
I think I understand.
This bundle use a unique object to store the breadcrumbs declare in annotations and call this object when you want to render the breadcrumbs.
In your functionnal tests, you browse virtualy another page in the same function but the breadcrumbs object is still set because you don't have really change the page.
from apybreadcrumbtrailbundle.
Auto closed, sorry.
I've update a bit the bundle. It resets the trail after each request.
Can you update and test ?
from apybreadcrumbtrailbundle.
Okay I update and test .. suspense !
from apybreadcrumbtrailbundle.
Somehting wrong ?
from apybreadcrumbtrailbundle.
It seems that i don't have breadcrumb when i'm logged in, try to check what happens
from apybreadcrumbtrailbundle.
I'll try another correction.
from apybreadcrumbtrailbundle.
Try this new version please.
from apybreadcrumbtrailbundle.
Now if i display an other page during the test, it keeps the breadcrumb from the first page, and adds parts which are added with the "add" method form the current page.
from apybreadcrumbtrailbundle.
Ok, I can't do more right now. I take a look this week end.
Sorry.
If you understand why this behavior occurs, contact me here.
from apybreadcrumbtrailbundle.
Okay thanks ! If i have time i will take a look and try some things.
from apybreadcrumbtrailbundle.
I found a solution !
With the first fix you suggested with "reset" function, it missing just a test : if the request is master or not.
It didn't work because I have a component in page header, and the master request breadcrumb was overridden by the component breadcrumb.
So with the test in "onKernelController" event, it works fine :
if($event->getRequestType() == HttpKernelInterface::MASTER_REQUEST) {
$this->breadcrumbTrail->reset();
$this->addBreadcrumbsFromAnnotations($this->reader->getClassAnnotations($class));
// Annotations from method
$method = $class->getMethod($controller[1]);
$this->addBreadcrumbsFromAnnotations($this->reader->getMethodAnnotations($method));
}
from apybreadcrumbtrailbundle.
But with this statement, do we have to call reset() ?
from apybreadcrumbtrailbundle.
Yes, or else we still have the original problem on functional tests.
from apybreadcrumbtrailbundle.
And with the new fix 1.
if (!$this->breadcrumbTrail->count()) {
}
Does it work too ?
from apybreadcrumbtrailbundle.
I haven't try and I don't think it works, do you want me to try ?
from apybreadcrumbtrailbundle.
Yes please if you have time to waste :D
from apybreadcrumbtrailbundle.
I don't think i'll have time tonight, but surely tomorrow :) ! To be sure, it's with new fix 1 and my test i have to try, and no reset function ?
from apybreadcrumbtrailbundle.
yes.
from apybreadcrumbtrailbundle.
After testing, it doesn't work with the new fix 1
from apybreadcrumbtrailbundle.
Voilà corrigé.
from apybreadcrumbtrailbundle.
It works fine, merci :)
from apybreadcrumbtrailbundle.
Great, first fix on this bundle. Thanks for your help.
from apybreadcrumbtrailbundle.
You're welcome !
from apybreadcrumbtrailbundle.
Related Issues (20)
- % sig in deprecation message breaks synfony on php8 HOT 2
- Deprecation notices (symfony 5.2.6 / deprecation-contracts 2.4.0) HOT 2
- Found unknown escape character "\B" HOT 1
- Page freeze HOT 2
- Overriding template in Symfony 5 HOT 3
- Trigger deprecations when using annotations
- add support for Rector annotation-to-attribute-migration HOT 8
- Update documentation to use PHP attributes instead of annotations
- Run Rector upgrade script as Composer plugin HOT 1
- Bug 1.7 #[Breadcrumb("{book.title}")] HOT 9
- Introduce annotation to reset breadcrumb trail HOT 4
- PHP 8.1 deprecation warnings HOT 2
- Tag symfony 6.1 HOT 2
- Update symfony/deprecation-contracts? HOT 3
- Symfony 6.3 deprecation warnings HOT 1
- Working without sensio extra framework HOT 3
- Continue trail of another Route
- It is not compatible with Symfony 7.0 HOT 1
- Conversion from parameter to object not working as intended in Symfony 6.3
- Conversion from parameter to object not working as intended in Symfony 6.3 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 apybreadcrumbtrailbundle.