Fmstrat / ownnote

Notes app for ownCloud
GNU Affero General Public License v3.0
168 stars 42 forks source link

tinymce editor not working #296

Open stixpunk opened 8 years ago

stixpunk commented 8 years ago

After open or create note, I don't see TinyMCE editor. I found many 404 errors in browser console and files looks like as tinymce plugins:

GET https://mydomain.tld/assets/themes/modern/theme.js 
GET https://mydomain.tld/assets/plugins/autolink/plugin.js 
GET https://mydomain.tld/assets/plugins/advlist/plugin.js 
GET https://mydomain.tld/assets/plugins/lists/plugin.js 
GET https://mydomain.tld/assets/plugins/link/plugin.js 
GET https://mydomain.tld/assets/plugins/charmap/plugin.js 
GET https://mydomain.tld/assets/plugins/print/plugin.js 
GET https://mydomain.tld/assets/plugins/preview/plugin.js 
GET https://mydomain.tld/assets/plugins/anchor/plugin.js 
GET https://mydomain.tld/assets/plugins/searchreplace/plugin.js 
GET https://mydomain.tld/assets/plugins/visualblocks/plugin.js 
GET https://mydomain.tld/assets/plugins/code/plugin.js 
GET https://mydomain.tld/assets/plugins/fullscreen/plugin.js 
GET https://mydomain.tld/assets/plugins/insertdatetime/plugin.js 
GET https://mydomain.tld/assets/plugins/media/plugin.js 
GET https://mydomain.tld/assets/plugins/table/plugin.js 
GET https://mydomain.tld/assets/plugins/contextmenu/plugin.js 
GET https://mydomain.tld/assets/plugins/bdesk_photo/plugin.js 
GET https://mydomain.tld/assets/plugins/autoresize/plugin.js 

Is there conflict with some other plugin, settings or other?

Owncloud version 8.2.3.2 (stable) Active apps:

Activity, Default encryption module, Deleted files, First Run Wizard, Gallery, Mail Template Editor, Notifications, PDF Viewer, Provisioning API, Share Files, Text Editor, Updater, Video Viewer, Calendar, OwnNote

OwnCloud config:

$CONFIG = array (
  'instanceid' => 'XXX',
  'passwordsalt' => 'XXX',
  'secret' => 'XXX',
  'trusted_domains' =>
  array (
    0 => 'XXX',
  ),
  'datadirectory' => '/data/cloud',
  'overwrite.cli.url' => 'XXX',
  'dbtype' => 'mysql',
  'version' => '8.2.3.2',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'owncloud',
  'dbpassword' => 'XXX',
  'logtimezone' => 'UTC',
  'installed' => true,
  'mail_from_address' => 'info',
  'mail_smtpmode' => 'php',
  'mail_domain' => 'XXX',
  'asset-pipeline.enabled' => true,
  'memcache.local' => '\OC\Memcache\Redis',
  'memcache.locking' => '\OC\\Memcache\Redis',
  'redis' => array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'memcache.distributed' => '\OC\Memcache\Memcached',
  'memcached_servers' => array(
     array('localhost', 11211),
  ),
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,
);

Server: Debian 8 Nginx 1.9.11 PHP 7.0.4 (fpm) MariaDB 10.1.12 Redis 3.0.7

stixpunk commented 8 years ago

I found tinymce working when disabling asset-pipeline.enabled Would be great to add support for asset-pipeline to this module.

stixpunk commented 8 years ago

Now I update to OC 9.0.0 and other problem found when asset-pipeline is disabled and tinymce editor is loaded:

tinymce.min.js?v=ae5843f…:2370 Refused to execute JavaScript URL because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.

Used nginx config is inspired from manual