Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Fix jQuery add_basket form selector. Resolves #405 #411

Merged
merged 1 commit into from
Feb 27, 2017

Conversation

azlotnikov
Copy link
Contributor

@azlotnikov azlotnikov commented Feb 25, 2017

Resolves #405

Changelog

### Fixed
- Fix jQuery `add_basket_button` form  selector for `ProductBundle:Product:view.html` and `ProductBundle:Product:view_thumbnail.html`

Subject

Fix jQuery add_basket_button form selector for ProductBundle:Product:view.html and ProductBundle:Product:view_thumbnail.html

@azlotnikov
Copy link
Contributor Author

azlotnikov commented Feb 26, 2017

I tried to figure out, why tests failed on php <= 5.5, and not failed 19 days ago (last build). Thats what I found:
Tests fail here inside DataGridBundle (2.2.1) Sonata\DatagridBundle\Pager\Doctrine\Pager

    public function computeNbResult()
    {
        ...
        $countQuery->select(sprintf(
            'count(DISTINCT %s.%s) as cnt',
            current($countQuery->getRootAliases()),
            current($this->getCountColumn())
        ));

But 2.2.1 version was released only 17 days ago, and before this code looks like:

    public function computeNbResult()
    {
        ...
        $countQuery->select(sprintf('count(DISTINCT %s.%s) as cnt', $countQuery->getRootAlias(), current($this->getCountColumn())));

The problem is in getRootAlias() and getRootAliases() functions.

Quick solution:
Fix composer.json at "sonata-project/datagrid-bundle": "2.2.0"

Good solution:
Figure out, what happened

@greg0ire, what do you think?

@jordisala1991
Copy link
Member

This is what needs to be done to fix those tests: sonata-project/SonataMediaBundle#1194

@azlotnikov
Copy link
Contributor Author

@jordisala1991, thanks
I'll make a new PR with tests fix

@jordisala1991
Copy link
Member

Let's trigger again build? oh, wait, you will have to rebase first 😄 my bad

@azlotnikov azlotnikov force-pushed the fix-basket-button branch 2 times, most recently from 7fe2b33 to b113418 Compare February 27, 2017 04:27
@azlotnikov
Copy link
Contributor Author

@jordisala1991 rebase - done

@greg0ire greg0ire merged commit faa98ab into sonata-project:2.x Feb 27, 2017
@greg0ire
Copy link
Contributor

Thanks @Zrazor !

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

Successfully merging this pull request may close these issues.

None yet

5 participants