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

fix select2 problem with taxonomy scraper #45

Merged
merged 4 commits into from
Aug 15, 2017

Conversation

kraftner
Copy link
Contributor

fixes #26

@herregroen
Copy link
Contributor

This unfortunately doesn't fix the issue for ACF5.

It seems to be a timing issue, when the Taxonomy scraper instantiates the select2 field hasn't yet been created. This due to it being created earlier when the ReplaceVars instantiate.

Delaying the replaceVars.createReplaceVars function until the ACF ready event resolves the issue.

See the code below:

acf.add_action('ready', function () {
	_self.replaceVars = replaceVars.createReplaceVars(collect);
});

@kraftner
Copy link
Contributor Author

Okay, that it is a timing issue might explain why I didn't see the problem. 😕

I've just pushed another commit, can you try if that fixes it for you?

@herregroen
Copy link
Contributor

Can confirm that all related tests pass as expected and manually testing everything looks good.

I am getting a failure on the Gallery test due to it not opening on the Media Library tab but I'll create a separate issue and pull request for that.

I'll merge this one and I think #43 should then be rebased on features/acf-5 so the ACF5 tests can be run ( and should pass ).

@herregroen herregroen merged commit b9c3fbc into features/acf-5 Aug 15, 2017
@kraftner kraftner deleted the stories/taxonomy-scraper-select2 branch August 16, 2017 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants