Skip to content

Commit

Permalink
Update composer-post-install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
EarthlingDavey committed Nov 18, 2024
1 parent 2c0523b commit 07198df
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bin/composer-post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@ if grep -q $TREE_VIEW_SEARCH $TREE_VIEW_FILE ; then
fi


ELASTIC_PRESS_TARGET_VERSION="5.1.3"
# This find/replace is for the ElasticPress plugin.
#
# When a new post is created via the WordPress dashboard, the existing behaviour of the ElasticPress plugin
# is to delete the post from the search index. Delteing a post that's not in the index causes a 404 error to
# be logged on Cloud Platform's OpenSearch proxy server.
#
# This change adds a check to see if the post is in the index before deleting it, preventing the 404 error.

ELASTIC_PRESS_TARGET_VERSION="5.1.4"
verify_composer_package_version "wpackagist-plugin/elasticpress" $ELASTIC_PRESS_TARGET_VERSION

ELASTIC_PRESS_FILE=/var/www/html/public/app/mu-plugins/elasticpress/includes/classes/Indexable/Post/SyncManager.php
Expand Down

0 comments on commit 07198df

Please sign in to comment.