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

CRM-21602 Fix javascript error on Campaign/petition pages #11466

Merged
merged 1 commit into from
Dec 30, 2017

Conversation

chandana-bandara
Copy link

@chandana-bandara chandana-bandara commented Dec 29, 2017

Overview

Fixed the JavaScript error occurred when viewing and do actions on Campaigns page Campaigns/Surveys/Petitions. The bug report was continuous loading icon when enabling/disabling campaigns

Before

The loading icon did not disappear when enabling/disabling campaigns

After

The loading icon disappears when enabling/disabling campaigns

Technical Details

Added CRM.$ instead of $ for jQuery selectors where applicable.
Branch rebased to master.

Comments

There are 3 pages Campaign/Petition/Survey. The Campaign page uses
(function($){
})(CRM.$)
hence within that function, $ can be used freely instead of CRM.$.
But other two pages Petition/Survey do not use that technique. Therefore CRM.$ needs to be used instead of $.


… Survey when jQuery noConflict is not initiated
@civicrm-builder
Copy link

Can one of the admins verify this patch?

@colemanw
Copy link
Member

@coolbit thanks for the PR :)
Usually such a small change would have only one commit in the PR but this one has 3 (including a merge commit which we try to avoid). The way to fix that is by running

git rebase -i ecc71ac

Then put s for squash beside the two commits other than ecc71ac and save.

Then force push your changes git push -f and the PR will be clean :)

@chandana-bandara
Copy link
Author

@colemanw Thanks!
I will follow your instructions above. But after that should I create a new PR?

@colemanw
Copy link
Member

Force pushing to the same branch will just update this PR.

@chandana-bandara
Copy link
Author

There is an issue while squashing the commits. It says "could not apply b638c71... Set version to 4.7.29". I think since there is a version change, it is having some difficulty.

Will that be OK if I take the master, do the fix and make a PR again? or what is the best way it should be done?

I'm quite new here and getting familiarized with the practices. Sorry for any inconveniences caused. Thanks,

@colemanw
Copy link
Member

Ok try this:

git checkout CRM-21602
git reset --hard ecc71ac
git push -f

@chandana-bandara
Copy link
Author

Did it. Please check :-)

@colemanw
Copy link
Member

Looks great.
@civicrm-builder add to whitelist.

@colemanw colemanw merged commit a51ebaf into civicrm:master Dec 30, 2017
@chandana-bandara chandana-bandara deleted the CRM-21602 branch December 31, 2017 03:04
sluc23 pushed a commit to ixiam/civicrm-core that referenced this pull request Jan 10, 2018
@mlutfy mlutfy changed the title Crm 21602 CRM-21602 Fix javascript error on Campaign/petition pages Feb 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants