wordpress icon indicating copy to clipboard operation
wordpress copied to clipboard

Compser install/update fails for new twentytwenty theme

Open ottok opened this issue 6 years ago • 3 comments

Similar to #60, composer has started failing on twentytwenty as it includes dotfiles. Output looks like this:

image

and in test format:

# composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 4 installs, 0 updates, 0 removals
  - Installing johnpbloch/wordpress-core (5.3.0): Loading from cache
  - Installing wpackagist-plugin/auto-post-thumbnail (3.6.0): Loading from cache
  - Installing wpackagist-plugin/google-analytics-dashboard-for-wp (5.3.9): Loading from cache
  - Installing wpackagist-theme/twentynineteen (1.4): Loading from cache
Generating autoload files
> WordPress\Installer::symlinkWPContent
Script WordPress\Installer::symlinkWPContent handling the post-install-cmd event terminated with an exception

                                                                         
  [ErrorException]                                                       
  glob(): Pattern exceeds the maximum allowed length of 4096 characters  
                                                                         

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...

This applies both for composer install and composer update.

Temporary fix is to: rm -rf /data/wordpress/htdocs/wp-content/themes/twentytwenty. Make manually sure that htdocs/wordpress/wp-content is a symlink to ../wp-content.

ottok avatar Nov 14 '19 07:11 ottok

Re-opening this so it is easier to find.

ottok avatar Nov 14 '19 08:11 ottok

Re-opening this so it is easier to find.

ottok avatar Nov 25 '19 11:11 ottok

How to fix it

  1. This has already been fixed in the project template and thus this issue does not apply to any new projects.
  2. This issue only applies to projects using WordPress 5.3 and twentytwenty, so the fix is not required for all old projects
  3. In projects where the fix is needed you can simply run:
cd scripts/WordPress/
curl -LO https://raw.githubusercontent.com/Seravo/wordpress/master/scripts/WordPress/Installer.php
git add Installer.php
git commit -m "Update composer install to be compatible with the dotfiles in twentytwenty"

ottok avatar Nov 26 '19 08:11 ottok