Answers.Body: <p>Solved for initial install, We are on FREEBSD with default shell was /bin/sh so the syntax is different than bash, try /bin/tsch and it will work with composer command suggested. THE OTHER ISSUE for patching is that cweagans/composer-patches stable is using as a hack the option --no-backup-if-mismatch that gnupatch supports but is not supported by FREEBSD patch. We used /usr/ports/devel/patch and linked gnu patch instead and the install completed. You may be able to use a devel version of cweagans/composer-patches that was fixed. Note the verbose details are in civicrm chat ~ drupal.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-31T05:56:10.163Z
Answers.LastActivityDate: 2024-10-31T05:56:10.163Z
Answers.UserDisplayName: cvpub
Body: <p>HELP.  Is it okay for patch errors during install on Drupal10?  and other issues...</p>
  <p>For installing Civicrm on Drupal 10 following instructions at
  //docs.civicrm.org/installation/en/latest/drupal/</p>
  <p>When I try the commands
  cd (to root of drupal, above web folder with json files)
  composer config extra.enable-patching true
  composer require civicrm/civicrm-{core,packages,drupal-8}</p>
  <p>I get the error:
  Could not find a matching version of package civicrm/civicrm-{core,packages,drupal-8}.
  Check the package spelling, your version constraint and that the package is available
  in a stability which matches your minimum-stability (stable).</p>
  <p>After that I also tried temp uninstall of drush prior as suggested for Drupal 9, no difference.
  composer remove drush/drush
  composer config extra.enable-patching true
  composer config minimum-stability dev
  However still fails same.</p>
  <p>So that composer syntax is not working for me.</p>
  <p>But I can make some progress if I do it individually like
  composer require civicrm/civicrm-core
  composer require civicrm/civicrm-packages
  composer require civicrm/civicrm-drupal-8</p>
  <p>The civicrm-core throws patch errors:</p>
  <p>(replaced in example errors the https w/ ***** for posting limits)</p>
  <pre><code>Cannot apply patch *****//raw.githubusercontent.com/civicrm/civicrm-core/9d93748a36c7c5d44422911db1c98fb2f7067b34/tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch ****://raw.githubusercontent.com/civicrm/civicrm-core/5506f4ce5d46799857b4f4ddf34069e7541e9cc5/tools/scripts/composer/zetacomponents-php-81-civicrm-custom.patch
  Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/a6a0ff13d2a155ad962529595dceaef728116f96/tools/scripts/composer/patches/net-smtp-patch.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/74e25f27bb3be32519657539afe8a285c6c99a08/tools/scripts/composer/patches/mail_mime_crm_3133.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/36319938a5bf26c1e7e2110a26a65db6a5979268/tools/scripts/composer/patches/pear-mail.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/2ad420c394/tools/scripts/composer/pear_db_civicrm_changes.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://patch-diff.githubusercontent.com/raw/adrienrn/php-mimetyper/pull/15.patch
  Could not apply patch! Skipping. The error was: Cannot apply patch *****://patch-diff.githubusercontent.com/raw/adrienrn/php-mimetyper/pull/17.patch
  .... allowing compile .....
  Using version ^5.78 for civicrm/civicrm-core
  
  
  composer require civicrm/civicrm-packages  Throws more patch errors
  
  Could not apply patch! Skipping. The error was: Cannot apply patch //raw.githubusercontent.com/civicrm/civicrm-core/9d93748a36c7c5d44422911db1c98fb2f7067b34/tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/5506f4ce5d46799857b4f4ddf34069e7541e9cc5/tools/scripts/composer/zetacomponents-php-81-civicrm-custom.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/a6a0ff13d2a155ad962529595dceaef728116f96/tools/scripts/composer/patches/net-smtp-patch.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/74e25f27bb3be32519657539afe8a285c6c99a08/tools/scripts/composer/patches/mail_mime_crm_3133.patch
  Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/36319938a5bf26c1e7e2110a26a65db6a5979268/tools/scripts/composer/patches/pear-mail.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/2ad420c394/tools/scripts/composer/pear_db_civicrm_changes.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://patch-diff.githubusercontent.com/raw/adrienrn/php-mimetyper/pull/15.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://patch-diff.githubusercontent.com/raw/adrienrn/php-mimetyper/pull/17.patch
  .... allowing compile ...
  Using version ^5.78 for civicrm/civicrm-packages
  
  
  composer require civicrm/civicrm-drupal-8  throws more patch errors
  
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://patch-diff.githubusercontent.com/raw/adrienrn/php-mimetyper/pull/15.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://patch-diff.githubusercontent.com/raw/adrienrn/php-mimetyper/pull/17.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/9d93748a36c7c5d44422911db1c98fb2f7067b34/tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/5506f4ce5d46799857b4f4ddf34069e7541e9cc5/tools/scripts/composer/zetacomponents-php-81-civicrm-custom.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/a6a0ff13d2a155ad962529595dceaef728116f96/tools/scripts/composer/patches/net-smtp-patch.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/74e25f27bb3be32519657539afe8a285c6c99a08/tools/scripts/composer/patches/mail_mime_crm_3133.patch
  .... allowing compile ....
  Using version ^5.78 for civicrm/civicrm-drupal-8
  </code></pre>
  <p>NOTE
  I had to GRANT TRIGGER for database, still had unknown DB error so for now I granted all privileges to sql user on databse which I do not like to do then I was able to run cv tools to setup data for civicrm.</p>
  <p>After all that I still get errors on accessing civicrm webpage /civivicrm
  like</p>
  <p>[Tue Oct 29 16:32:03.188115 2024] [proxy_fcgi:error] [pid 47817:tid 36541568768] [client 97.68.180.217:63110] AH01071: Got error 'PHP message: Uncaught PHP Exception IntlException: &quot;Constructor failed&quot; at ******/vendor/civicrm/civicrm-core/CRM/Utils/Money.php line 249'</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-30T22:41:03.640Z
Comments.Text: If you try applying one of the patches manually, does it work? e.g. `git apply something.patch`. Regarding `civicrm-{core,packages,drupal-8}` syntax giving an error - are you on windows by chance? That syntax won't work on windows. Also what php version?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-31T04:06:02.897Z
Comments.Text: <pre>The first road bump is the composer command fails with suggested syntax: 
    composer require civicrm/civicrm-{core,packages,drupal-8}
  So as to why that happened I think it may be the syntax is not good for Bourne Shell.
  The shell I was using was the freebsd bourne shell.
  $ echo $SHELL
  /bin/sh
  
  I switched user to tsch shell to see if any different.
  % echo $SHELL
  /bin/tcsh
  
  Well okay the syntax for composer works in the tcsh shell but not pure bourne shell.  
  FYI starting with FREEBSD 14 the default shell is sh 
  So onward to the other problems.
  </pre>  grr... comments wrapped.
Comments.UserDisplayName: cvpub
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-31T04:08:40.440Z
Comments.Text: yes I will try doing the patches by hand.
Comments.UserDisplayName: cvpub
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-31T04:11:26.660Z
Comments.Text: new to stack exchange, having problems answering in limited lenght and format of comments.  I am reposting this issue on civicrm chat ~drupal and will post back resolutions..... I am very disappointed in stack exchange atm.
Comments.UserDisplayName: cvpub
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-31T04:18:59.683Z
Comments.Text: Here is link to Civicrm Chat 
  https://chat.civicrm.org/civicrm/channels/drupal/bmy5xw9wabftucc4mdsb8txxwy
Comments.UserDisplayName: cvpub
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-31T04:29:54.120Z
Comments.Text: PS.  yes if I go to the folder with the file to be patched, wget the patch, I can manually apply the patch.  But I have to be in the folder, like ./vendor/adrienrn/php-mimetyper
Comments.UserDisplayName: cvpub
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-31T05:55:43.547Z
Comments.Text: Solved for initial install,  We are on FREEBSD with default shell was /bin/sh so the syntax is different than bash, try /bin/tsch and it will work with composer command suggested.  THE OTHER ISSUE for patching is that cweagans/composer-patches stable is using as a hack the option --no-backup-if-mismatch that gnupatch supports but is not supported by FREEBSD patch.   We used /usr/ports/devel/patch and linked gnu patch instead and the install completed.  You may be able to use a devel version of cweagans/composer-patches that was fixed.  Note the verbose details are in civicrm chat ~ drupal.
Comments.UserDisplayName: cvpub
Tags: <drupal><error><install>
Title: Install issues with composer syntax and patch errors done individually for D10 install
ThreadText: # Install issues with composer syntax and patch errors done individually for D10 install
  
  (Asked by: username_0 on 2024-10-29)
  
  HELP. Is it okay for patch errors during install on Drupal10? and other issues...
  
  For installing Civicrm on Drupal 10 following instructions at
  //docs.civicrm.org/installation/en/latest/drupal/
  
  When I try the commands
  cd (to root of drupal, above web folder with json files)
  composer config extra.enable-patching true
  composer require civicrm/civicrm-{core,packages,drupal-8}
  
  I get the error:
  Could not find a matching version of package civicrm/civicrm-{core,packages,drupal-8}.
  Check the package spelling, your version constraint and that the package is available
  in a stability which matches your minimum-stability (stable).
  
  After that I also tried temp uninstall of drush prior as suggested for Drupal 9, no difference.
  composer remove drush/drush
  composer config extra.enable-patching true
  composer config minimum-stability dev
  However still fails same.
  
  So that composer syntax is not working for me.
  
  But I can make some progress if I do it individually like
  composer require civicrm/civicrm-core
  composer require civicrm/civicrm-packages
  composer require civicrm/civicrm-drupal-8
  
  The civicrm-core throws patch errors:
  
  (replaced in example errors the https w/ \*\*\*\*\* for posting limits)
  
  ```
  Cannot apply patch *****//raw.githubusercontent.com/civicrm/civicrm-core/9d93748a36c7c5d44422911db1c98fb2f7067b34/tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch ****://raw.githubusercontent.com/civicrm/civicrm-core/5506f4ce5d46799857b4f4ddf34069e7541e9cc5/tools/scripts/composer/zetacomponents-php-81-civicrm-custom.patch
  Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/a6a0ff13d2a155ad962529595dceaef728116f96/tools/scripts/composer/patches/net-smtp-patch.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/74e25f27bb3be32519657539afe8a285c6c99a08/tools/scripts/composer/patches/mail_mime_crm_3133.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/36319938a5bf26c1e7e2110a26a65db6a5979268/tools/scripts/composer/patches/pear-mail.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/2ad420c394/tools/scripts/composer/pear_db_civicrm_changes.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://patch-diff.githubusercontent.com/raw/adrienrn/php-mimetyper/pull/15.patch
  Could not apply patch! Skipping. The error was: Cannot apply patch *****://patch-diff.githubusercontent.com/raw/adrienrn/php-mimetyper/pull/17.patch
  .... allowing compile .....
  Using version ^5.78 for civicrm/civicrm-core
  
  composer require civicrm/civicrm-packages  Throws more patch errors
  
  Could not apply patch! Skipping. The error was: Cannot apply patch //raw.githubusercontent.com/civicrm/civicrm-core/9d93748a36c7c5d44422911db1c98fb2f7067b34/tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/5506f4ce5d46799857b4f4ddf34069e7541e9cc5/tools/scripts/composer/zetacomponents-php-81-civicrm-custom.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/a6a0ff13d2a155ad962529595dceaef728116f96/tools/scripts/composer/patches/net-smtp-patch.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/74e25f27bb3be32519657539afe8a285c6c99a08/tools/scripts/composer/patches/mail_mime_crm_3133.patch
  Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/36319938a5bf26c1e7e2110a26a65db6a5979268/tools/scripts/composer/patches/pear-mail.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/2ad420c394/tools/scripts/composer/pear_db_civicrm_changes.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://patch-diff.githubusercontent.com/raw/adrienrn/php-mimetyper/pull/15.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://patch-diff.githubusercontent.com/raw/adrienrn/php-mimetyper/pull/17.patch
  .... allowing compile ...
  Using version ^5.78 for civicrm/civicrm-packages
  
  composer require civicrm/civicrm-drupal-8  throws more patch errors
  
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://patch-diff.githubusercontent.com/raw/adrienrn/php-mimetyper/pull/15.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://patch-diff.githubusercontent.com/raw/adrienrn/php-mimetyper/pull/17.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/9d93748a36c7c5d44422911db1c98fb2f7067b34/tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/5506f4ce5d46799857b4f4ddf34069e7541e9cc5/tools/scripts/composer/zetacomponents-php-81-civicrm-custom.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/a6a0ff13d2a155ad962529595dceaef728116f96/tools/scripts/composer/patches/net-smtp-patch.patch
   Could not apply patch! Skipping. The error was: Cannot apply patch *****://raw.githubusercontent.com/civicrm/civicrm-core/74e25f27bb3be32519657539afe8a285c6c99a08/tools/scripts/composer/patches/mail_mime_crm_3133.patch
  .... allowing compile ....
  Using version ^5.78 for civicrm/civicrm-drupal-8
  
  ```
  
  NOTE
  I had to GRANT TRIGGER for database, still had unknown DB error so for now I granted all privileges to sql user on databse which I do not like to do then I was able to run cv tools to setup data for civicrm.
  
  After all that I still get errors on accessing civicrm webpage /civivicrm
  like
  
  [Tue Oct 29 16:32:03.188115 2024] [proxy\_fcgi:error] [pid 47817:tid 36541568768] [client 97.68.180.217:63110] AH01071: Got error 'PHP message: Uncaught PHP Exception IntlException: "Constructor failed" at \*\*\*\*\*\*/vendor/civicrm/civicrm-core/CRM/Utils/Money.php line 249'
  
  **Tags:** drupal, error, install
  
  > **Comments:**
  > **username_1**: If you try applying one of the patches manually, does it work? e.g. `git apply something.patch`. Regarding `civicrm-{core,packages,drupal-8}` syntax giving an error - are you on windows by chance? That syntax won't work on windows. Also what php version?  
  > **username_0**: <pre>The first road bump is the composer command fails with suggested syntax:    composer require civicrm/civicrm-{core,packages,drupal-8} So as to why that happened I think it may be the syntax is not good for Bourne Shell. The shell I was using was the freebsd bourne shell. $ echo $SHELL /bin/sh  I switched user to tsch shell to see if any different. % echo $SHELL /bin/tcsh  Well okay the syntax for composer works in the tcsh shell but not pure bourne shell.   FYI starting with FREEBSD 14 the default shell is sh  So onward to the other problems. </pre>  grr... comments wrapped.  
  > **username_0**: yes I will try doing the patches by hand.  
  > **username_0**: new to stack exchange, having problems answering in limited lenght and format of comments.  I am reposting this issue on civicrm chat ~drupal and will post back resolutions..... I am very disappointed in stack exchange atm.  
  > **username_0**: Here is link to Civicrm Chat  https://chat.civicrm.org/civicrm/channels/drupal/bmy5xw9wabftucc4mdsb8txxwy  
  > **username_0**: PS.  yes if I go to the folder with the file to be patched, wget the patch, I can manually apply the patch.  But I have to be in the folder, like ./vendor/adrienrn/php-mimetyper  
  > **username_0**: Solved for initial install,  We are on FREEBSD with default shell was /bin/sh so the syntax is different than bash, try /bin/tsch and it will work with composer command suggested.  THE OTHER ISSUE for patching is that cweagans/composer-patches stable is using as a hack the option --no-backup-if-mismatch that gnupatch supports but is not supported by FREEBSD patch.   We used /usr/ports/devel/patch and linked gnu patch instead and the install completed.  You may be able to use a devel version of cweagans/composer-patches that was fixed.  Note the verbose details are in civicrm chat ~ drupal.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2024-10-31. Score: 1
  
  Solved for initial install, We are on FREEBSD with default shell was /bin/sh so the syntax is different than bash, try /bin/tsch and it will work with composer command suggested. THE OTHER ISSUE for patching is that cweagans/composer-patches stable is using as a hack the option --no-backup-if-mismatch that gnupatch supports but is not supported by FREEBSD patch. We used /usr/ports/devel/patch and linked gnu patch instead and the install completed. You may be able to use a devel version of cweagans/composer-patches that was fixed. Note the verbose details are in civicrm chat ~ drupal.
  
  
  ---
  
  