WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 3 months ago

#50839 closed defect (bug) (reported-upstream)

WooCommerce Product type option Gone

Reported by: makewebbetter Owned by:
Milestone: Priority: normal
Severity: critical Version: 5.5
Component: Administration Keywords:
Focuses: Cc:

Description

Hello I install new beta RC-1 and i am using woocommerce also so the strange thing i saw is no option now to select product type while creating a new product

Before i update i have this option - https://www.dropbox.com/s/pn7d62z0hyqg79h/image.png?dl=0

But now this option gone see here - https://www.dropbox.com/s/l4g3g8e66a6lrye/image%281%29.png?dl=0

Attachments (2)

image.png (53.2 KB) - added by makewebbetter 3 months ago.
image(1).png (21.9 KB) - added by makewebbetter 3 months ago.

Download all attachments as: .zip

Change History (10)

@makewebbetter
3 months ago

#1 follow-up: @Clorith
3 months ago

  • Component changed from Plugins to Administration
  • Version set to trunk

Introduced by markup changes in #39074, specifically r48373

WooCommerce targets #woocommerce-product-data .hndle span, but the span was removed in this commit.

Quick check of other plugins targeting the metabox span https://wpdirectory.net/search/01EEW7P78JSFR72F0WCE9XPFR8 shows it's not that widespread, but we've not surfaced the markup changes so it might have been missed by a few.

#2 in reply to: ↑ 1 @SergeyBiryukov
3 months ago

  • Milestone changed from Awaiting Review to 5.5

Thanks for the ticket and the initial investigation here!

Replying to Clorith:

Introduced by markup changes in #39074, specifically r48373

WooCommerce targets #woocommerce-product-data .hndle span, but the span was removed in this commit.

I don't see any <span> tags removed in that commit, just some reordered output.

I suspect this is a side effect of using CSS flexbox on the heading for edit-box links, same as in #50788 and #50836:

.postbox-header .hndle {
	flex-grow: 1;
	/* Handle the alignment for the configurable dashboard widgets "Configure" edit-box link. */
	display: flex;
	justify-content: space-between;
	align-items: center;
}

Moving to 5.5 for visibility, since this is causing more back compat concerns than I'm comfortable with.

It's not quite clear whether the change to flexbox is necessary for [48373]. If no solution is found before the final release, this can be punted to 5.5.1, but I'd like to explore our options here first.

#3 @SergeyBiryukov
3 months ago

Related WooCommerce issues:

  • #27167 Variable Products broken in WC 4.3.1 and WP 5.5RC1(also with WC 4.4 Beta and WP 5.5RC1)
  • #27169 [WC 4.3.1] Broken metabox headers when using WordPress 5.5

This appears to be resolved upstream, but can still be an issue for other plugins, as noted in comment:1.

#4 follow-up: @afercia
3 months ago

back compat concerns

I'd argue core can't really support plugins that "hack" the meta boxes headers this way. If plugins want to "customize" their meta boxes that's totally fine but in this specific case I'd really call it "hacking" (in a good sense) the core UI. These heavy "customization" are totally fine but plugins that do this, they do it at the risk of HTML and CSS changes in core that may happen at any time.

Last edited 3 months ago by afercia (previous) (diff)

#5 @afercia
3 months ago

FYI: I closed #39074 as "fixed" _before_ I read this ticket. Do feel free to reopen it if necessary.

#6 follow-up: @Clorith
3 months ago

The removed span element is at the very end of the commit, it used to be echo "<span>{$box['title']}</span>"; (inside the h2tags), just to have the reference completely in place (Woo was injecting stuff into the header via JavaScript and targeting that selector, for reference).

#7 in reply to: ↑ 6 @SergeyBiryukov
3 months ago

Replying to Clorith:

The removed span element is at the very end of the commit, it used to be echo "<span>{$box['title']}</span>"; (inside the h2tags), just to have the reference completely in place (Woo was injecting stuff into the header via JavaScript and targeting that selector, for reference).

Ah, indeed, I missed that. Thanks for the clarification!

#8 in reply to: ↑ 4 @SergeyBiryukov
3 months ago

  • Milestone 5.5 deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

Replying to afercia:

I'd argue core can't really support plugins that "hack" the meta boxes headers this way. If plugins want to "customize" their meta boxes that's totally fine but in this specific case I'd really call it "hacking" (in a good sense) the core UI. These heavy "customization" are totally fine but plugins that do this, they do it at the risk of HTML and CSS changes in core that may happen at any time.

Fair enough :) Since the issue is addressed upstream by WooCommerce, I think we can close the ticket accordingly.

Let's also make sure #39074 gets a dev note, and keep an eye on #50836 or any additional reports.

Note: See TracTickets for help on using tickets.