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

Phase 2 beta test #76

Closed
dkoo opened this issue Jun 21, 2021 · 4 comments
Closed

Phase 2 beta test #76

dkoo opened this issue Jun 21, 2021 · 4 comments

Comments

@dkoo
Copy link
Contributor

dkoo commented Jun 21, 2021

This is a single issue where we can track all problems or requests related to the transition from v1.X.X to v2.X.X.

@dkoo dkoo added this to the Phase 2 milestone Jun 21, 2021
@dkoo dkoo self-assigned this Jun 21, 2021
@dkoo
Copy link
Contributor Author

dkoo commented Jun 21, 2021

Default page templates

v2 allows listings to use any of the post templates in Newspack themes, and defaults to whatever the default is set to for posts in Customizer. However, v1 defaulted all listings to the "One column wide" template, so after upgrading to v2, preexisting listings may unexpectedly switch to the default post template.

Proposed solution

A couple of options here:

  1. Create a new Customizer option for "Default listing template" that will live alongside the "Default post template" option, and default that to "One column wide" I tested this and because listings render the template in a slightly hacky way, changing the option in the customizer did not update the customizer preview. For this reason I think we should just go with option 2 below.
  2. Just default all listings to "One column wide" – implemented in fix: default listings to one-column-wide.php post template #77. The template can still be changed for individual listings.

Status

@dkoo dkoo changed the title [Phase 2 beta test] Phase 2 beta test Jun 21, 2021
@matticbot
Copy link
Contributor

🎉 This issue has been resolved in version 2.0.0-alpha.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@dkoo
Copy link
Contributor Author

dkoo commented Jun 23, 2021

Legacy term conversion causes a memory leak

First seen on Oaklandside.org. The underlying cause is unknown since it's not reproducible on other sites. The convert_legacy_taxonomies function causes a memory leak that results in a fatal error: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /wordpress/core/5.7.2/wp-includes/class-wp-hook.php on line 276

Note: the functions to fix missing or orphaned shadow terms are also a potential source of the memory leak. I've moved these functions to WP CLI as well.

Proposed solution

A couple of options:

  1. Gate execution of that function behind an environment flag. This would avoid running the conversion script unless the flag is set to true, instead of running it on admin_init. Since the memory leak breaks WP admin, we should avoid tying these functions to admin at all.
  2. Move the function to a WP CLI command. This would require us to execute the WP CLI command to convert legacy terms, but this seems preferable since it would likely need to be run only once for any site. Implemented in fix: memory leaks from legacy term utilities #81.

Status

In progress

@matticbot
Copy link
Contributor

🎉 This issue has been resolved in version 2.0.0-alpha.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@dkoo dkoo closed this as completed Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants