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

SQL query is printed into browser in case of exception #13607

Merged
merged 1 commit into from
Mar 13, 2018
Merged

SQL query is printed into browser in case of exception #13607

merged 1 commit into from
Mar 13, 2018

Conversation

shyamranpara
Copy link
Contributor

Description

SQL query is printed into browser in case of exception

Fixed Issues (if relevant)

  1. SQL query is printed into browser in case of exception #13385: SQL query is printed into browser in case of exception

Manual testing scenarios

Add an erroneous SQL statement to collection select object. I've added this code to \Magento\Catalog\Block\Product\ListProduct::initializeProductCollection():
$collection = $layer->getProductCollection();
$collection->getSelect()->columns('qwerty');
as an example
Open some category page in a browser.
SQL query is printed in a browser

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@shyamranpara
Copy link
Contributor Author

@magento-engcom-team, can you guide me how to remove old commits not related to this ?
Custom address attribute shown on frontend #12524
Travis cli fix

@hostep
Copy link
Contributor

hostep commented Feb 11, 2018

@shyamranpara: every PR needs its own branch and you should try to make sure it is up2date with the current 2.2-develop branch from the magento repo. Then create a new commit on that new branch and then create a PR from that new branch.
To make sure your new branch is up2date with the latest from the magento repo, is to add an upstream remote and bring your local branch in sync with the upstream repo, you can read more about this over here:

There is also some documentation on the devdocs, but they lack actual examples:
http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#sync

I tend to do something like this after the upstream remote has been set up:

git checkout 2.2-develop # checkout the 2.2-develop branch on my local machine
git fetch upstream # fetch all the changes from the upstream remote (they aren't being applied just yet)
git pull upstream 2.2-develop # bring my local 2.2-develop branch up2date with the one from the magento repo
git checkout -b my-new-branch # create a new branch with the name 'my-new-branch' based on the current branch in use
# manipulate some files
git commit -m "My new commit which fixes A & B"
git push origin my-new-branch # push your new branch to your own fork (=origin remote)
# now create a PR using Github's UI

Hope this helps

@orlangur
Copy link
Contributor

@shyamranpara even simpler approach is to create a new branch based on 2.2-develop as shown in previous comment and then do git cherry-pick d77b9708dcc361c3f849219b24b41ba11b564384.

@shyamranpara
Copy link
Contributor Author

shyamranpara commented Feb 12, 2018

@orlangur , @hostep Thanks for guide.
I created new PR #13623 hence, I guess this PR should be closed or maked as rejected.

@orlangur
Copy link
Contributor

@shyamranpara new PR contains two commits anyway, let's continue here. Please just force push into the same issue-13385 branch.

@orlangur
Copy link
Contributor

@shyamranpara please rewrite branch so that it contains only necessary changes as a single commit.

Just tell me if you need any assistance with that.

@shyamranpara
Copy link
Contributor Author

shyamranpara commented Feb 21, 2018

thanks for support let me try again.

@shyamranpara
Copy link
Contributor Author

@orlangur I have rewrite branch please check it.

@magento-engcom-team
Copy link
Contributor

Hi @orlangur, thank you for the review.
ENGCOM-839 has been created to process this Pull Request

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

Successfully merging this pull request may close these issues.

4 participants