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

dev/drupal#169 - Fix namespacing in kcfinder #338

Merged
merged 1 commit into from
Jan 9, 2022

Conversation

demeritcowboy
Copy link
Contributor

@demeritcowboy demeritcowboy commented Jan 9, 2022

Fixes an error when uploading images to CKEditor via KCFinder, as reported in https://civicrm.stackexchange.com/questions/41023/cannot-upload-images-using-ckeditor-on-message-template-after-5-45-upgrade

Specifically, this revises #335 to avoid namespace issues.

@civibot
Copy link

civibot bot commented Jan 9, 2022

(Standard links)

@tapashdatta
Copy link

This works @demeritcowboy. Thanks

@colemanw
Copy link
Member

colemanw commented Jan 9, 2022

Unrelated test fails.

@colemanw colemanw merged commit ac84a47 into civicrm:5.46 Jan 9, 2022
@demeritcowboy
Copy link
Contributor Author

Thanks. I'll put up a 5.45 backport in case there's a .1 release.

@demeritcowboy demeritcowboy deleted the namespace branch January 9, 2022 16:50
@demeritcowboy demeritcowboy mentioned this pull request Jan 9, 2022
@totten
Copy link
Member

totten commented Jan 11, 2022

On the explanation, "fix namespacing" is a little opaque. I searched a bit and added a link to Stackexchange, which seems to be the original error report.

So to clarify scope of impact... the original issue dev/drupal#169 was about environmental-compatibility. Did this regression impact all environments or just some environments? Are we missing some coverage here (either wrt r-run or phpunit)?

@seamuslee001
Copy link
Contributor

@totten it only affected Drupal 8./9 AFAIK as that is the only one where the namespacing is important.

@demeritcowboy
Copy link
Contributor Author

Yes it should just be drupal 8/9.

I'd say the coverage gap on 335 was mostly a review fail, but with a partial excuse. I tested it on drupal 7 and tried to test it on drupal 8 but kcfinder didn't work on drupal 8 so I didn't think too much more about it. Or at least it doesn't work out of the box - obviously some people have a workaround.

And for the description here I should have linked directly to the comment on 335. And yes it's only partly related to dev/drupal169 - 335 was something @seamuslee001 put up as a followup to the fix for dev/drupal169 for completeness.

@totten
Copy link
Member

totten commented Jan 11, 2022

Yeah, the disposition of ckeditor/kcfinder/cms-compat is confusing. And testing something like this is... rather persnickity...

FWIW, the report on StackExchange had some D7 indicators (sites/all/modules is more common D7), and I was perplexed by the idea that civicrm-packages/kcfinder/core/class/browser.php has different namespacing based on CMS revision. So I retested on D7 - for me, (a) the error arises on D7 and (b) the patch solves it on D7. 👍

(So in the RN's, I omitted any qualifier about CMS/environment.)

@demeritcowboy
Copy link
Contributor Author

Interesting. I just tried again with my local drupal 7 and it's fine without the backslash. Maybe some other factor? Anyway it seems fixed for everybody now.

Trying to think if I can blame something on composer...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants