Answers.Body: <p>There is an issue called <a href="https://lab.civicrm.org/dev/civicrm-asset-plugin/-/issues/4" rel="nofollow noreferrer">kcfinder libraries is missing files</a> and presently this issue is open with no resolution.</p>
  <p>Bottom line: There is a bug in CiviCRM with Drupal 9 and KCFinder.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-02-20T13:09:49.123Z
Answers.LastActivityDate: 2022-02-20T13:09:49.123Z
Answers.UserDisplayName: Hershel
Body: <p>There are other discussions on this but there does not appear to be a concrete solution. I am hoping that someone can help me with a solution and then I can also document this better.</p>
  <p>When I go to add an image to an email with kcfinder <em>Browse Server</em> option I get a popup with a 404.</p>
  <p>The URL in the popup <a href="https://crm.mysite.org/libraries/civicrm/packages/kcfinder/browse.php?cms=civicrm&amp;type=images&amp;CKEditor=crmUiId_1&amp;CKEditorFuncNum=0&amp;langCode=en" rel="nofollow noreferrer">https://crm.mysite.org/libraries/civicrm/packages/kcfinder/browse.php?cms=civicrm&amp;type=images&amp;CKEditor=crmUiId_1&amp;CKEditorFuncNum=0&amp;langCode=en</a> appears to be correct.</p>
  <p>This has me thinking that the issue is the Drupal htaccess rules.</p>
  <p>The files for kcfinder were not in the libraries/civicrm/packages/kcfinder folder by default but I added the files from another Drupal 8 install.</p>
  <p>I am not sure there is other information I can provide that would be of use to solve this.</p>
  <p>Thanks,
  Steve</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-16T12:02:37.493Z
Comments.Text: It sounds like `composer civicrm:publish` didn't run properly during install. You can try running that on its own.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-09T02:48:50.937Z
Comments.Text: Unfortunately, that did not change anything.  Thanks!
Comments.UserDisplayName: Steve Kessler
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-04-27T08:30:22.670Z
Comments.Text: Quick update: There are currently two issues regarding this bug: https://lab.civicrm.org/dev/civicrm-asset-plugin/-/issues/4 and https://lab.civicrm.org/dev/core/-/issues/3419. Also a possible workaround is described here: https://civicrm.stackexchange.com/questions/40231/ckeditor-drupal9-gives-403-forbidden-when-browsing-server
Comments.UserDisplayName: Fabian
Tags: <civimail><kcfinder>
Title: Drupal 8/9 htaccess Breaks kcfinder
ThreadText: # Drupal 8/9 htaccess Breaks kcfinder
  
  (Asked by: username_0 on 2021-07-16)
  
  There are other discussions on this but there does not appear to be a concrete solution. I am hoping that someone can help me with a solution and then I can also document this better.
  
  When I go to add an image to an email with kcfinder *Browse Server* option I get a popup with a 404.
  
  The URL in the popup <https://crm.mysite.org/libraries/civicrm/packages/kcfinder/browse.php?cms=civicrm&type=images&CKEditor=crmUiId_1&CKEditorFuncNum=0&langCode=en> appears to be correct.
  
  This has me thinking that the issue is the Drupal htaccess rules.
  
  The files for kcfinder were not in the libraries/civicrm/packages/kcfinder folder by default but I added the files from another Drupal 8 install.
  
  I am not sure there is other information I can provide that would be of use to solve this.
  
  Thanks,
  username_0
  
  **Tags:** civimail, kcfinder
  
  > **Comments:**
  > **username_1**: It sounds like `composer civicrm:publish` didn't run properly during install. You can try running that on its own.  
  > **username_2**: Unfortunately, that did not change anything.  Thanks!  
  > **username_3**: Quick update: There are currently two issues regarding this bug: https://lab.civicrm.org/dev/civicrm-asset-plugin/-/issues/4 and https://lab.civicrm.org/dev/core/-/issues/3419. Also a possible workaround is described here: https://civicrm.stackexchange.com/questions/40231/ckeditor-drupal9-gives-403-forbidden-when-browsing-server  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2022-02-20. Score: 1
  
  There is an issue called [kcfinder libraries is missing files](https://lab.civicrm.org/dev/civicrm-asset-plugin/-/issues/4) and presently this issue is open with no resolution.
  
  Bottom line: There is a bug in CiviCRM with Drupal 9 and KCFinder.
  
  
  ---
  
  