From 0c5ecc54fa9781c73fd9914a63226c4959bed9d5 Mon Sep 17 00:00:00 2001 From: gogdzl <37049295+gogdzl@users.noreply.github.com> Date: Wed, 30 Oct 2024 10:00:43 -0300 Subject: [PATCH] CRM: Fix export crash when custom field name clashes with linked objects (#38851) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docker: Re-add xz-utils (#39553) Previously this was installed as a dependency of mailcap, which was a dependency of mime-support, which was a dependency of various things. But apparently things depending on mime-support are transitioning to media-types which doesn't have that dependency. We need xz-utils for extracting `build.tar.xz` in CI, so make sure it's installed. * Bump wc-calypso-bridge to 2.7.1 and add changelog (#39557) * Add/icons for all product cards on dashboard (#39513) * Ensure all product cards on Jetpack Dashboard have icons when inactive * changelog * Add icon to boost install section * Fix AI missing icon when active * Move CRM back to where it was * Remove/connection nudges where not needed (#39533) * Remove connection nudges for cards that don't need it on dashboard * Ask for user connection on Blaze when not present and remove nudge on Akismet * changelog * Get rid of connection nudge for Search modules * Fix blaze tests * phan: Update wpcom stubs (#39565) Co-authored-by: Phabricator Bot * wpcom_add_shopping_cart: Use new is_cart_empty function (#39563) * Blocks: convert to module (#39449) * Blocks: convert to a module Co-authored-by: Brad Jorsch * Jetpack: Remove WAF deprecation notice (#39568) * Title Optimization: improve button behavior on error screen (#39554) * Properly close the modal when Cancel is clicked, cleaning up the state * Skip new generation on try again button when there are options already * Changelog * Jetpack: remove excessive hooks from social logos and genericons (#39564) `jetpack_register_social_logos()` and `jetpack_register_genericons` is called directly, and the files are [loaded](https://github.com/Automattic/jetpack/blob/8d8e0e6ef75b32c52029a57740cb6e13c6312296/projects/plugins/jetpack/class.jetpack.php#L735) on `wp_loaded` after the `init` hook has already run. * Remove/unnecessary textdomain filter (#39552) * i18n: Remove unnecessary filter to loading translations This filter has been moved to D162485-code * changelog * Add changelog files * Jetpack AI Logo generator toolbar button label (#39550) * add prop to toggle button text * show button text Generate if the site has no logo set * add changelog * rename prop so it's not misleading * Change/at a glance unify connection ctas (#39535) * Update CTA for connection related cards on At A Glance * changelog * Fix JS tests * Fix e2e test * Fix alignment issue on smaller screens * Fix e2e test * Fix cta spacing issue * Add border to connection cards * Fix e2e test * Make border transparent * Align content with title on connection cards * Jetpack: remove unused infinite scroll code (#39570) * Remove unused and non-working code. * Deprecate functions that are no longer needed to be removed later. * Protect: Fix blockedRequests destructuring fallback (#39569) * Protect: Fix overwritten FirewallSubheading updates (#39571) * Reapply overwritten changes * changelog * Fix import * Move stories to broken directory * My Jetpack: update notice style on mobile (#39537) * My Jetpack: update notice mobile style * changelog * Update notice style to the same when there's title * My Jetpack Welcome Flow: Show default recommendations upfront first, then offer optional survey (#39485) * Jetpack plugin - Story Block: Fix 'Division by zero' Fatal (#39577) * Jetpack plugin - Story Block: Fix 'Division by zero' Fatal * Masterbar: Remove User Info side-panel (#39546) * Masterbar: Remove User Info side-panel * Jetpack Sync: Fix a bug in syncing HPOS 'woocommerce_delete_order' actions (#39562) * Jetpack Sync: Fix a bug in syncing HPOS 'woocommerce_delete_order' actions * 'connect_url_redirect' hook: Redirect to the 'redirect_after_auth' url if already connected (for 'connect_after_checkout' flow) (#39573) * Fix parameters to allow for connectAfterCheckout flow from recommendation card (#39578) * Fix parameters to allow for connectAfterCheckout flow from recommendation card * changelog * Fix fetching the default value in the hook itself * changelog * Help Center: use Zendesk staging when proxied (#39566) * My Jetpack: fix spacing between price and discount tag (#39576) * My Jetpack: fix discount tag spacing * changelog * Follow Blog Widget: Strip Slashes on Subscribe Text (#39433) Removes slashes from the Subscribe text output on the Follow Blog widget. It looks like the Subscribe block already does this, which is why the issue doesn't happen there. It's just been annoying me a bit lately that the Follow Blog widget doesn't do the same too. * Fix a case where wp_rand is undefined. (#39581) * Added a check for wp_rand in case pluggables are not loaded yet. * Changelog. * Revert "Change/at a glance unify connection ctas (#39535)" (#39584) This reverts commit 4f47d298ffd8726cc5168a27d5540e0242388755. * wpcomsh: Move `load_muplugin_textdomain` call to `after_setup_theme` hook (#39586) * Social: Add Bluesky connection UI (#39561) * Add Bluesky to the supported services * Update connect URL logic for Bluesky * Create a dedicated component for custom inputs * Update ConnectForm to use CustomInputs * Update ServiceItem component to handle Bluesky custom inputs * Do the make up * Add changelog * Fix messed up translations * Clean up * Backport jetpack 13.9-beta Changes (#39587) * Changelog and readme.txt edits. * Amend readme.txt * Changelog and readme.txt edits. (#39598) * Social: Fix Bluesky not showing up on page load (#39597) * Email preview: improve error state visually (#39476) * Jetpack: Check $submenu is not NULL before adding Scan option (#39424) * Check $submenu is not NULL before accessing it * Add changelog --------- Co-authored-by: mmtr <1233880+mmtr@users.noreply.github.com> * Update/at a glance unify connection ctas (#39585) * Unify connection notices on At A Glance * changelog * Fix nudges on settings page * Fix tests * Changes the error Blaze shows during sync to be a warning (#39515) * Changes the error Blaze shows during sync to be a warning * Update/jetpack settings connection nudges (#39591) * Unify connection nudges on settings * changelog * Update dependency core-js to v3.38.1 (#39592) * Update dependency core-js to v3.38.1 * Remove unnecessary deps --------- Co-authored-by: Renovate Bot Co-authored-by: Brad Jorsch * Changelog. (#39606) * Post-migration Experience: Adds the placeholder task list (#39593) * Add the placeholder Migration task list * changelog * Update the tasklist name to match calypso's --------- Co-authored-by: Valter Lorran * Release WAF 0.20.1. (#39607) * Update Size-limit to v11.1.6 (#39595) Co-authored-by: Renovate Bot * Update dependency uplot to v1.6.31 [SECURITY] (#39610) Co-authored-by: Renovate Bot * Protect: Fix last_checked conversions (#39549) * Convert last_checked value so it in local time before the WP install timezone conversions apply * changelog * Update var naming * Protect: Improve optimistically scanning (#39538) * Improve optimistically scanning * Update formatting * changelog * Always return API data when scan status is non-idle * Fix lastChecked timezone conversion * Clean up useScanStatusQuery queryFn * Update projects/plugins/protect/src/js/data/scan/use-scan-status-query.ts Co-authored-by: Nate Weller * Fix lint error * Fix lint error * Update projects/plugins/protect/src/js/data/scan/use-scan-status-query.ts Co-authored-by: Nate Weller * Update projects/plugins/protect/src/js/data/scan/use-start-scan-mutation.ts Co-authored-by: Nate Weller --------- Co-authored-by: Nate Weller * Protect: Minor clean up of scan page index component (#39574) * Settings: Newsletter: Adding connection banner to each section (#39539) * Settings: Adding connection banner for all Newsletter options * changelog * Settings: Updating icon for the Newsletter connection banner * Settings: Updating icon for the Newsletter connection banner * Settings: Renaming const and its value * Admin Menu: Adding tests to test Jetpack admin menu 'current' menu item class and menu order (#39374) * Update Jetpack Scan link (#39619) * Update Jetpack Scan link in menu * changelog * Update Jetpack scan link for Default view * changelog * Fix test * wpcomsh: Update translations (#39621) * Update language files * changelog * wpcomsh: Update translations (#39623) * Update language files * changelog * Backport Jetpack 13.9 changes to readme and CHANGELOG.md. (#39622) * Changelog edits. * Changelog squash and readme.txt. * Jetpack 13.9. * Reset to-test.md. * Changelog and readme.txt edits. (#39624) * Connection: initialize assets in wp-admin only (#39604) Only initialize Connection assets in the admin area. * Update wordpress monorepo (#39594) * Update wordpress monorepo * Update test for Modal close animation * Remove obsolete `@types/wordpress__media-utils`, as `@wordpress/media-utils` contains types now. Fix one type. --------- Co-authored-by: Renovate Bot Co-authored-by: Brad Jorsch * Performance: remove imploding CSS code (#39518) * Protect: Update use fixers query error prop handling (#39498) * Update FixerStatus type to account for potential error props * changelog * Handle error responses * Only handle top level errors in useFixersQuery, threat level errors are handled in the completion block * Add clarifying comment * Improve fixer types * Fix prop handling * Update useFixers hook for compatibility with type updates * Remove optional chaining where applicable, update logic to rely on TS types * Update types * Fix type error --------- Co-authored-by: Nate Weller * wpcomsh: Update wc-calypso-bridge to 2.8.0 (#39613) * Sitemap: Make sitemap storing more efficient by not querying the full post content before saving (#39572) * Make sitemap storing more efficient but not querying the full post content when storing the sitemap This update tries to remediate a problem where the persistent object cache gets huge with data that we will not use in the end. We just need to get the id of the current sitemap post and if it exists, we update it. Before, we were using get_post and this polluted the cache running into OOM situations * Shortcodes: Fix warning when attachment src is false in shortcodes module (#39601) * Check if the attachment is false, to avoid warnings * Boost: Exclude shortcode produced scripts from deferred js (#39616) * Exclude shortcode provided scripts from deferred js * changelog * Roles endpoint: Use instance of for checking wp roles (#39634) * Improve roles check * changelog * Added defensive check for arrays * Updated phan baseline * Jetpack plugin: Update phan baselines --------- Co-authored-by: Foteini Giannaropoulou * phan: Update custom stubs (#39632) Co-authored-by: matticbot * Issue templates: add new issue type option (#39637) This was added as an option as part of this set of changes to GitHub issues: https://github.blog/changelog/2024-10-01-evolving-github-issues-public-preview/ * Update dependency photon to v4.1.1 (#39639) * blogging-prompt: preserve language on answers link (#36730) * Admin bar: replace 'Edit Profile' and 'My Account' with 'My Profile' (#39600) * profile.php: Make wpcom links more concise (#39636) * Social: Fix share status tooltip text overflow (#39599) * WPCOMSH: Remove redirection from /wp-admin/plugin.php to /plugins/manage/ (#39615) * remove redirection * changelog * Boost: Fix photon URL check (#39635) * Extract is_photon_url to a method * Improve photon URL check in image guide proxy * changelog * Rename the method for consistency * Add boost changelog * Add a test * Update projects/packages/image-cdn/src/class-image-cdn-core.php Co-authored-by: Brad Jorsch * Update projects/packages/image-cdn/changelog/add-photon-url-check-method Co-authored-by: Brad Jorsch --------- Co-authored-by: Brad Jorsch * Update dependency @sentry/browser to v8 [SECURITY] (#39640) Co-authored-by: Renovate Bot * e2e tests: update encryption key (#39645) * Update VideoPress block connection banner, align with other blocks (#39628) * Make VideoPress connection banner consistent with Nudge component * changelog * Polish the VideoPress connection banner * Move constants in block * Remove unintentional change * WAF: Allow rules to specify body parser type (#39516) * WAF: Add support for rules file to manually specify body parsing method * Add public $version property to Waf_Runtime * Blocks: provide nice error message for workaround in dev env (#39602) * Provide nice error message for workaround * typos will be the dealth of me * Settings - Newsletter, Sharing: Disabling options for sites missing user connection (#39520) * Newsletters: Disabling controls that need user connection * changelog * Settings: Fixing disabled label when not saving * Settings: Improving isLinked check * Settings: Removing disabled CSS from active controls * Settings: Disabling sharing without a connected user * Settings: Disabling newsletter settings for sites without a single connected user * Settings: Disabling also whole groups * Settings: Updating the description of the task * Settings: Updating the description of the task * Boost: Use "critical css gen" package from the monorepo (#39509) * Update Boost to use "critical css gen" package from the monorepo * add changelog * Update Boost to use new browser and node from "critical css gen" package * add changelog * Update package entry points * Cleanup package entry points * Use dynamic import for global type definitions * Add browser entry point back to package * Use dynamic import for css generator * Don't use destructuring * Update default entry point to use browser version * Update Boost to use updated package entry point * Simplify package build * Remove unnecessary dependency enqueue * Attempt to fix tests * Rename dynamically imported file * Merge dynamic import files * Add build step for tests * Cleanup build for tests * Fix tests breaking due to missing package build * Update package entry points Co-authored-by: Brad Jorsch * Add helper for critical css generator import * update changelogs --------- Co-authored-by: Brad Jorsch * Post-migration Experience: Add the "Review the site's content" task (#39641) * Add the Review site task * changelog * Remove calypso path --------- Co-authored-by: Valter Lorran * Backport changes in JS Packages (#39664) * Update versions/changelog * Update lock file * VideoPress: use "Processing" thumbnail placeholder while a new thumbnail is being saved (#39631) * Export the thumb update status on the edit details hook * Use poster updating status to set video thumb as processing * Changelog --------- Co-authored-by: Douglas * Connection: optimize admin_notices owner delete warning (#39650) Optimize the `admin_notices` hook conditions to get rid of an excessive callback. * Fix new PHPCompatibility-dev sniff (#39665) PHPCompatibility, in their dev branch, just added a sniff for the `$escape` parameter to various CSV-related functions, since PHP has decided they might change the default in 9.0. * Update dependency cookie to v0.7.0 [SECURITY] (#39649) --------- Co-authored-by: Renovate Bot * Update dependency mediawiki/mediawiki-codesniffer to v44 (#39648) * Update dependency mediawiki/mediawiki-codesniffer to v44 * Update monorepo root composer.lock. New versions of various other phpcs packages. * MediaWiki.Usage.DoubleNotOperator has been removed upstream. * Disable Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence.MissingParentheses pending discussion * Fix new Squiz.Commenting.FunctionComment.MissingParamType sniffs --------- Co-authored-by: Renovate Bot Co-authored-by: Brad Jorsch * Jetpack AI: change logo generator styles source (#39589) * remove style definitions from frontend, add type for style object * update types and hook props * remove showStyleSelector prop, take it from hook now. Use styles as sent from backend, filtered and shaped there already * add siteFragment to global interface for initial JP state, avoid linter warnings * add changelogs * remove the need for beta feature and gutenberg extension, if backend sends it, we use it * find_psr4_file: Quick exit if psr4_map is not populated (#39646) * Update storybook monorepo to v8.3.5 (#39669) --------- Co-authored-by: Renovate Bot * Lock file maintenance (#39653) * Lock file maintenance --------- Co-authored-by: Renovate Bot * WAF: Include waf_supported and automatic_rules_last_updated in the jetpack/v4/waf REST API endpoint response (#39511) * Jetpack Sync: Add 'woocommerce_analytics_first_activation' in options' whitelist (#39658) * Jetpack Sync: Add 'woocommerce_analytics_first_activation' in options' whitelist * Image CDN: URL encode path parts (#39560) * rawurlencode each path part in the image URL * Fix a typo * Add a test * changelog * Add comment to clarify space usage --------- Co-authored-by: Peter Petrov * Sync: Don't sync set object terms action for blacklisted taxonomies (#39663) * Filter out set_object_terms actions with blacklisted taxonomies * Args in this flow does not have the terms retrieved as objects. Instead we rely directly on the taxonomy * changelog * Update projects/packages/sync/src/modules/class-terms.php Co-authored-by: Foteini Giannaropoulou --------- Co-authored-by: Foteini Giannaropoulou * Newsletter: change default reply-to option from "no reply" to "comments" (#39657) * Changelog and readme.txt edits. (#39668) * Update dependency express to v4.21.0 (#39670) --------- Co-authored-by: Renovate Bot * Sharing: register menu even when user is not connected to wpcom. (#39677) Fixes p1728349589696649-slack-CDD9LQRSN * explat: Fix Phan issues (#39443) Add some missing `use` directives and add `WP_Error` to one return declaration. * Fix/bug where connection banner shows in p2 (#39667) * Fix issue where simple and atomic sites were showing connection banner * changelog * Fix blogroll block unhelpful error when user not connected (#39638) * Add connection nudge to blogroll block * changelog * Update connection banner to show if current user is not connected * My Jetpack: Fix recommendations VideoPress product card not showing "Purchase" button. (#39612) * Add/jetpack blocks add connection nudge where missing (#39647) * changelog * Add connection nudges to all payment blocks * Check for current user connection instead of connected owner * Fix/payment blocks connection banner showing on simple sites (#39687) * Fix connection banner for payment blocks on simple sites * changelog * Fix condition * Stats: Fix top post card on the Insight page (#39691) * add required fields to endpoint * changelog * add discussion and post thumbnail * comment * Social: Update the check to see if Bluesky is already connected (#39661) * Add check to update post json api to handle null input type (#39676) * Update class.wpcom-json-api-update-post-v1-2-endpoint.php to handle null input type * changelog * Prevent welcome tour keyboard navigation from hijacking left right keys on the editor (#39683) * Sync my jetpack's Boost page with Boost's getting started page (#39130) * Sync my jetpack's Boost page with Boost's getting started page * add changelog * Remove unused prop * Update Boost pricing table to rely on the same data as my jetpack * Add features list component to reduce code repetition * Fix type incompatibility * Remove unused code * add changelog * Reduce localized data * Update premium pricing to rely on my jetpack variables instead of own * Remove unused type * Use data sync for 'my jetpack' data instead of directly localizing * Add test for my jetpack data in Boost * Fix test signature * Update prop name * Simplify tests * Update php tests to be less strict in terms of feature order * Add a check for feature count * AI Client: change logo generator upgrade message (#39671) * use getRedirectUrl package to get URL links to more info on usage and limits * update upgrade copy edit for logo generator * add changelogs * AI Client: add image styles auto and none (#39689) * add auto and none as available image styles * changelog * Jetpack AI: don't generate first logo without details (#39536) * remove noisy debug call * don't call first logo generation if there are no site details to work with * make use logo button more prominent (secondary) * add empty logo placeholder * add empty logo history placeholder * add changelog * fix state checks for first load * add enter key handler on prompt input * improve empty placeholders * rolling release: Add timestamp to version numbers (#39701) Apparently Atomic doesn't just pick the latest release, they also require that the new version number compares greater than the old one as measured by `version_compare()`. So we'll have to throw a timestamp in after all. * WAF: Avoid using Waf_Rules_Manager from Waf_Runner::initialize() (#38944) * eslint: Enable more react rules (#39421) * `react-hooks/exhaustive-deps`: Apply to `useSelect`. * `react/no-direct-mutation-state` * `react/no-find-dom-node` * `react/no-unescaped-entities` The first of those accounts for the majority of fixes in this PR, we had a bunch of places either missing a dependency or specifying a dependency unnecessarily. Of particular note is that constants defined outside of the `render()` function, like `STORE_ID`, don't need to be dependencies. Of the rest, `react/no-direct-mutation-state` was only violated in one place, `react/no-unescaped-entities` in one storybook story, and `react/no-find-dom-node` was already fixed everywhere. * jetpack: Render Slideshow block correctly in iframed editor (#39551) When the block editor uses an iframe, our monolithic `editor.js` script is only loaded and run at the top level, not inside the iframe. Thus, any dynamic `import()` also only runs at the top level, and in particular the loaded CSS does not affect the content inside the iframe. The real solution to this would be to have the content-related code in block.json "script" where it gets loaded everywhere (frontend, editor top-level, and iframe) (unfortunately there's no option that runs only on frontend+iframe, or only iframe) and run the code doing the `import()` inside the iframe, so it adds the CSS inside the iframe. But we can't really do that without a ton of refactoring that's largely blocked on Gutenberg implementing lazy block loading. So, in the mean time, let's configure mini-css-extract-plugin to add any imported CSS into the iframe (if one exists) in addition to the top level. That won't work for JS (e.g. the Map block, which has its own hack), but that's ok for now. * Update wordpress monorepo (#39707) --------- Co-authored-by: Renovate Bot * Goodreads Block: Make sure we check for id attribute in the goodreads block, when rendering (#39713) * Make sure we check for id attribute in the goodreads block, before attempting to use it for rendering as id of the div. * changelog * Social: Added Bluesky to social previews (#39659) * Update dependencies * Add Bluesky to social previews * Add changelogs * Update social-previews package to fix the Bluesky URL * Update pnpm-lock.yaml * Fix dependencies after rebase * Admin bar: clean up WPCOM_ADMIN_BAR_UNIFICATION feature flag (#39692) * Admin bar: clean up WPCOM_ADMIN_BAR_UNIFICATION * changelog * Added do_action_deprecated and apply_filters_deprecated to next version script (#39693) * Infinite scroll added checks to validate input (#39618) * Added isset checks to avoid Warnings * changelog * Added new isset for last_post_date * Deprecate infinite_scroll_posts_where hook * Boost: Fix page cache e2e tests (#39695) * Fix not always logged in for page cache e2e test This allows the page cache e2e test to be run independently every time without issues. * Use WP_Filesystem when trying to update wp-config.php for pace cache * add changelog * Use WP_Filesystem_Direct to update wp-config.php * Set file permissions to avoid fatal errors * Update param value * Rename method * Critical CSS Gen: Add missing build folder for production (#39723) * Add missing build folder to production build * add changelog * Boost: Properly update minimum required WP version to 6.5 (#39719) * Update minimum required version to 6.5 * add changelog * Update changelog * Photon: avoid deprecation warnings when src is null (#39685) * Photon: avoid deprecation warnings when src is null In some scenarios, one can run into the following deprecation notices: Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /wordpress/plugins/jetpack/13.9-a.7/jetpack_vendor/automattic/jetpack-image-cdn/src/class-image-cdn.php on line 682 This should avoid those notices. * Check for the validity of the src earlier See https://github.com/Automattic/jetpack/pull/39685#pullrequestreview-2357095359 --------- Co-authored-by: Brad Jorsch * Jetpack Sync 3.14. (#39724) * VideoPress: Add missing check for empty video_info on get_media_item_v1_1 (#39706) * Add missing check for empty video_info * changelog * Use ! empty * Backport Critical css gen 1.0.1 (#39726) * Newsletter: featured image settings UI defaults (#39700) * Post-migration Experience: Add the plugin review task (#39711) * Add the Review Plugins task * changelog * Add the calypso path for the task --------- Co-authored-by: Valter Lorran * Backport boost 3.5.2-beta Changes (#39728) * Added null check post status obj in sal site class (#39727) * Add null check for post_status_obj to avoid PHP Warnings * changelog * Ensure we only assign get_post_status_object to the parent status in case the parent exists * eslint: Enable `@wordpress/no-base-control-with-label-without-id` rule (#39708) When `` is passed both a `label` and `id`, it makes an HTML `