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

phpList - CKEditor images not working (and other improvements) #1278

Closed
JedMeister opened this issue Dec 13, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@JedMeister
Copy link
Member

commented Dec 13, 2018

Matthew reported in the forums that he was having troubles with the images component of CKEditor in our phpList appliance. The error that he was getting was: HTTP error occurred during file upload (404: File not found).

Following his instructions I was able to recreate the issue. It turns out that there are a few things that we should tweak with the phpList appliance (detailed below), but the main one causing the 404 is the Path to KCFinder setting in the ckeditor settings. By default it is set to /var/www/phplist/admin/plugins/CKEditorPlugin/kcfinder (the absolute file path). However, it should be relative to the admin web path. I.e. plugins/CKEditorPlugin/kcfinder.


Workaround

This can be adjusted via the settings: Admin >> Config >> Manage plugins >> CKEditor Settings (within the CKEditorPlugin area). Then change the "Path to KCFinder" to plugins/CKEditorPlugin/kcfinder.

Also the php-gd extension should be installed to support the display of images:

apt update
apt install php-gd
service apache2 restart

Roundup of issues that should be fixed for the next release of phpList:

  • set 'kcfinder_path','plugins/CKEditorPlugin/kcfinder' (in DB - phplist.config)
  • inclusion of php-gd in the plan
  • inclusion of php-zip in the plan (support for downloaded plugins)
  • chown the custom plugin dir to www-data (avoid warning)
  • create symlinks to the default included plugins so that they work OOTB. I.e.:
chown -R www-data:www-data /var/www/phplist-plugins
for path in /var/www/phplist/admin/plugins/*; do
    ln -s $path /var/www/phplist-plugins/$(basename $path)
done
  • disable Apache indexes (i.e. -Indexes in the Apache config: /etc/apache2/sites-avaialble/phplist.conf)

@JedMeister JedMeister added this to the 15.2 milestone Dec 13, 2018

@JedMeister JedMeister changed the title phpList - CKEditor images not working phpList - CKEditor images not working (and other improvements) Dec 13, 2018

@JedMeister

This comment has been minimized.

Copy link
Member Author

commented Dec 17, 2018

@JedMeister JedMeister closed this Dec 17, 2018

@miningandhydraulics

This comment has been minimized.

Copy link

commented Dec 19, 2018

You will need to update the Ckeditor for PHP list to 2.1.5

This now works for me :)

@JedMeister

This comment has been minimized.

Copy link
Member Author

commented Dec 19, 2018

Yes that is correct. Apologies that that wasn't explicitly mentioned. Perhaps I should note it somewhere on the readme (or similar)?!

We don't pre-create that as as per upstream (i.e. the phpList developers) note, it does open a potential security hole. The risk is probably low, but it's best to be aware of that when you enable it. The rationale is that if it's enabled by default, users aren't aware of the potential risks.

@miningandhydraulics

This comment has been minimized.

Copy link

commented Dec 19, 2018

Yes that is correct. Apologies that that wasn't explicitly mentioned. Perhaps I should note it somewhere on the readme (or similar)?!

We don't pre-create that as as per upstream (i.e. the phpList developers) note, it does open a potential security hole. The risk is probably low, but it's best to be aware of that when you enable it. The rationale is that if it's enabled by default, users aren't aware of the potential risks.

That would be a help adding it into the readme :) and maybe adding the new version into your image

@JedMeister

This comment has been minimized.

Copy link
Member Author

commented Dec 20, 2018

Firstly, I'm not 100% sure what I was thinking when I did my last post above. It must have been a long day... 😄 (Oh I see now... You edited your post so my comment no longer makes sense...)

Anyway, I will be rebuilding the phpList appliance shortly and we'll publish an updated version with all the improvements I've made. Unfortuantely, it may not be available until early in the new year as I'm off for a couple of weeks tomorrow.

But thanks again for bringing the issue(s) to my attention! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.