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

Compser install/update fails for new twentytwenty theme #121

Open
ottok opened this issue Nov 14, 2019 · 3 comments
Open

Compser install/update fails for new twentytwenty theme #121

ottok opened this issue Nov 14, 2019 · 3 comments
Assignees

Comments

@ottok
Copy link
Contributor

ottok commented Nov 14, 2019

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
Copy link
Contributor Author

ottok commented Nov 14, 2019

Re-opening this so it is easier to find.

1 similar comment
@ottok
Copy link
Contributor Author

ottok commented Nov 25, 2019

Re-opening this so it is easier to find.

@ottok ottok reopened this Nov 25, 2019
@ottok ottok self-assigned this Nov 26, 2019
@ottok
Copy link
Contributor Author

ottok commented Nov 26, 2019

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"

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

1 participant