Git Product home page Git Product logo

Comments (26)

Abhoryo avatar Abhoryo commented on May 25, 2024

Hi,
I don't know your website but do you use ajax to change your page after login ?

from apybreadcrumbtrailbundle.

isabellebruchet avatar isabellebruchet commented on May 25, 2024

No i don't use ajax, maybe i'm doing something wrong in my test but i don't know what

from apybreadcrumbtrailbundle.

Abhoryo avatar Abhoryo commented on May 25, 2024

Maybe the breadcrumbs are not visible but exist when you browsing pages.
How do you test it with the functional text ?

from apybreadcrumbtrailbundle.

Abhoryo avatar Abhoryo commented on May 25, 2024

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.

Abhoryo avatar Abhoryo commented on May 25, 2024

Auto closed, sorry.

I've update a bit the bundle. It resets the trail after each request.
Can you update and test ?

from apybreadcrumbtrailbundle.

isabellebruchet avatar isabellebruchet commented on May 25, 2024

Okay I update and test .. suspense !

from apybreadcrumbtrailbundle.

Abhoryo avatar Abhoryo commented on May 25, 2024

Somehting wrong ?

from apybreadcrumbtrailbundle.

isabellebruchet avatar isabellebruchet commented on May 25, 2024

It seems that i don't have breadcrumb when i'm logged in, try to check what happens

from apybreadcrumbtrailbundle.

Abhoryo avatar Abhoryo commented on May 25, 2024

I'll try another correction.

from apybreadcrumbtrailbundle.

Abhoryo avatar Abhoryo commented on May 25, 2024

Try this new version please.

from apybreadcrumbtrailbundle.

isabellebruchet avatar isabellebruchet commented on May 25, 2024

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.

Abhoryo avatar Abhoryo commented on May 25, 2024

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.

isabellebruchet avatar isabellebruchet commented on May 25, 2024

Okay thanks ! If i have time i will take a look and try some things.

from apybreadcrumbtrailbundle.

isabellebruchet avatar isabellebruchet commented on May 25, 2024

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.

Abhoryo avatar Abhoryo commented on May 25, 2024

But with this statement, do we have to call reset() ?

from apybreadcrumbtrailbundle.

isabellebruchet avatar isabellebruchet commented on May 25, 2024

Yes, or else we still have the original problem on functional tests.

from apybreadcrumbtrailbundle.

Abhoryo avatar Abhoryo commented on May 25, 2024

And with the new fix 1.

if (!$this->breadcrumbTrail->count()) {

}

Does it work too ?

from apybreadcrumbtrailbundle.

isabellebruchet avatar isabellebruchet commented on May 25, 2024

I haven't try and I don't think it works, do you want me to try ?

from apybreadcrumbtrailbundle.

Abhoryo avatar Abhoryo commented on May 25, 2024

Yes please if you have time to waste :D

from apybreadcrumbtrailbundle.

isabellebruchet avatar isabellebruchet commented on May 25, 2024

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.

Abhoryo avatar Abhoryo commented on May 25, 2024

yes.

from apybreadcrumbtrailbundle.

isabellebruchet avatar isabellebruchet commented on May 25, 2024

After testing, it doesn't work with the new fix 1

from apybreadcrumbtrailbundle.

Abhoryo avatar Abhoryo commented on May 25, 2024

Voilà corrigé.

from apybreadcrumbtrailbundle.

isabellebruchet avatar isabellebruchet commented on May 25, 2024

It works fine, merci :)

from apybreadcrumbtrailbundle.

Abhoryo avatar Abhoryo commented on May 25, 2024

Great, first fix on this bundle. Thanks for your help.

from apybreadcrumbtrailbundle.

isabellebruchet avatar isabellebruchet commented on May 25, 2024

You're welcome !

from apybreadcrumbtrailbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.