ownnote
ownnote copied to clipboard
Server: Ownnote doesn't work when assets is enabled
Steps to reproduce
- use php 5.5
- enable: 'asset-pipeline.enabled' => true,
- open the notes app
Expected behaviour
The note app is still working
Actual behaviour
while the note list opens, the editor will not load with 404 error for plugin.js
Server configuration
Operating system: Centos 6.6
Web server: Apache2
Database: MySQL
PHP version:
php -v
PHP 5.5.23 (cli) (built: Mar 29 2015 13:58:26)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with the ionCube PHP Loader v4.6.1, Copyright (c) 2002-2014, by ionCube Ltd.
ownCloud version: (see ownCloud admin page): 8.0.2
**Updated from an older ownCloud or fresh install:**yes 5->6->7-.8.0.2
List of activated apps:
Enabled:
- activity
- calendar
- contacts
- documents
- files
- files_pdfviewer
- files_sharing
- files_texteditor
- files_trashbin
- files_versions
- files_videoviewer
- firstrunwizard
- galleryplus
- mail
- music
- news
- ownnote
- tasks
- templateeditor
- updater
Disabled:
- external
- files_encryption
- files_external
- files_locking
- gallery
- provisioning_api
- search_lucene
- user_external
- user_ldap
- user_webdavauth
The content of config/config.php:
cat config.php.assets
<?php
$CONFIG = array (
'instanceid' => 'id',
'passwordsalt' => 'salt',
'datadirectory' => '/home/user/public_html/oc_data',
'dbtype' => 'mysql',
'version' => '8.0.2.0',
'dbname' => 'db',
'dbhost' => 'localhost',
'dbtableprefix' => 'oc_',
'dbuser' => 'user',
'dbpassword' => 'pass',
'installed' => true,
'forcessl' => true,
'loglevel' => 0,
'log_rotate' => '104857600',
'theme' => '',
'maintenance' => false,
'trusted_domains' =>
array (
0 => 'domain.com',
),
'mail_smtpmode' => 'smtp',
'mail_from_address' => 'notifications',
'mail_domain' => 'domain.com',
'overwrite.cli.url' => '/owncloud',
'allow_user_to_change_display_name' => true,
'logtimezone' => 'Asia/Tokyo',
'preview_libreoffice_path' => '/usr/bin/libreoffice',
'preview_office_cl_parameters' => ' --headless --nologo --nofirststartwizard --invisible --norestore -convert-to pdf -outdir ',
'secret' => 'secret,
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'mail_smtpname' => '[email protected]',
'mail_smtppassword' => 'pass',
'mail_smtpsecure' => 'ssl',
'mail_smtphost' => 'server.domain.com',
'mail_smtpport' => '465',
'appcodechecker' => false,
'asset-pipeline.enabled' => true,
'custom_csp_policy' => 'default-src \'self\'; script-src \'self\' \'unsafe-inline\' \'unsafe-eval\'; style-src \'self\' \'unsafe-inline\'; frame-src *; img-src *; font-src \'self\' data:; media-src *',
'preview_max_scale_factor' => 1,
'enabledPreviewProviders' =>
array (
0 => 'OC\\Preview\\Image',
1 => 'OC\\Preview\\Illustrator',
2 => 'OC\\Preview\\Postscript',
3 => 'OC\\Preview\\Photoshop',
4 => 'OC\\Preview\\TIFF',
),
);
Are you using external storage, if yes which one: local/smb/sftp/... no
Are you using encryption: yes/no no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no
Client configuration
Browser: Firefox 35
Operating system: GNU/Linux (archlinux)
Logs
Web server error log
cannot find the error in the logs..
ownCloud log (data/owncloud.log)
nothing interresting here but anyway:
{"reqId":"889f42d4dffd54e48b9659870a5dfb71","remoteAddr":"130.158.198.92","app":"no app in context","message":"Accessing the API class is deprecated! Use the appropriate services instead!","level":0,"time":"2015-03-31T11:01:04+09:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/Notes"}
{"reqId":"11f16c958fce9ac1e387ab1d4c48a725","remoteAddr":"130.158.198.92","app":"no app in context","message":"Accessing the API class is deprecated! Use the appropriate services instead!","level":0,"time":"2015-03-31T11:01:17+09:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/Documents"}
{"reqId":"fa9d5d2d47bc21a1a3cbfdbfa37bf699","remoteAddr":"130.158.198.92","app":"no app in context","message":"Accessing the API class is deprecated! Use the appropriate services instead!","level":0,"time":"2015-03-31T11:01:18+09:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/Videos"}
{"reqId":"4cf8b80bee202c1b05e8fef6b32c3108","remoteAddr":"130.158.198.92","app":"no app in context","message":"Accessing the API class is deprecated! Use the appropriate services instead!","level":0,"time":"2015-03-31T11:01:20+09:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/Research"}
{"reqId":"d020a64e27a46d4e12532d5e6c4e3ac8","remoteAddr":"130.158.198.92","app":"no app in context","message":"Accessing the API class is deprecated! Use the appropriate services instead!","level":0,"time":"2015-03-31T11:01:21+09:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/Library"}
{"reqId":"de16db3f7136d25c2b10320cbf7b423b","remoteAddr":"130.158.198.92","app":"no app in context","message":"Accessing the API class is deprecated! Use the appropriate services instead!","level":0,"time":"2015-03-31T11:01:24+09:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/Notes"}
{"reqId":"7d918076f9bf3b4c0ce10d9bfc722321","remoteAddr":"130.158.198.92","app":"no app in context","message":"Accessing the API class is deprecated! Use the appropriate services instead!","level":0,"time":"2015-03-31T11:01:28+09:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/"}
{"reqId":"18b0df21e42e5f6440cee9dcec6db31d","remoteAddr":"130.158.198.92","app":"no app in context","message":"Accessing the API class is deprecated! Use the appropriate services instead!","level":0,"time":"2015-03-31T11:01:29+09:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/"}
Browser log
a) without assets enabled
GET oc.js?v=12b19ab091e9342ffc119f6117000321 200 OK domain.com 2.0 KB ip:443 1.34s
GET jquery.min.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 90.9 KB ip:443 2.43s
GET jquery-migrate.min.js?v=...1e9342ffc119f6117000321 304 Not Modified domain.com 6.9 KB ip:443 2.46s
GET jquery-ui.custom.js?v=12...1e9342ffc119f6117000321 304 Not Modified domain.com 422.5 KB ip:443 2.61s
GET underscore.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 44.4 KB ip:443 2.63s
GET moment-with-locales.js?v...1e9342ffc119f6117000321 304 Not Modified domain.com 317.5 KB ip:443 2.74s
GET handlebars.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 87.6 KB ip:443 2.78s
GET placeholders.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 18.8 KB ip:443 2.81s
GET jquery-tipsy.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 9.1 KB ip:443 2.83s
GET compatibility.js?v=12b19...1e9342ffc119f6117000321 304 Not Modified domain.com 3.5 KB ip:443 3.01s
GET jquery.ocdialog.js?v=12b...1e9342ffc119f6117000321 304 Not Modified domain.com 6.3 KB ip:443 3.02s
GET oc-dialogs.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 21.4 KB ip:443 3.11s
GET js.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 40.4 KB ip:443 3.13s
GET l10n.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 7.1 KB ip:443 3.18s
GET fr.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 20.8 KB ip:443 3.2s
GET octemplate.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 3.0 KB ip:443 3.41s
GET eventsource.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 4.1 KB ip:443 3.42s
GET config.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 1.5 KB ip:443 3.48s
GET search.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 10.7 KB ip:443 3.57s
GET oc-requesttoken.js?v=12b...1e9342ffc119f6117000321 304 Not Modified domain.com 156 B ip:443 3.5s
GET apps.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 1.9 KB ip:443 3.58s
GET snap.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 31.6 KB ip:443 3.78s
GET placeholder.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 2.2 KB ip:443 3.79s
GET md5.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 9.4 KB ip:443 3.82s
GET jquery.avatar.js?v=12b19...1e9342ffc119f6117000321 304 Not Modified domain.com 3.4 KB ip:443 3.59s
GET avatar.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 286 B ip:443 3.68s
GET share.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 44.9 KB ip:443 3.68s
GET fr.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 17.7 KB ip:443 3.92s
GET loader.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 4.8 KB ip:443 3.93s
GET admin.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 2.9 KB ip:443 3.94s
GET fr.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 5.3 KB ip:443 3.96s
GET viewer.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 3.5 KB ip:443 4.06s
GET previewplugin.js?v=12b19...1e9342ffc119f6117000321 304 Not Modified domain.com 3.6 KB ip:443 4.66s
GET fr.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 4.2 KB ip:443 4.3s
GET share.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 6.9 KB ip:443 4.31s
GET external.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 4.2 KB ip:443 4.3s
GET editor.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 14.2 KB ip:443 4.31s
GET ace.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 551.6 KB ip:443 4.42s
GET fr.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 446 B ip:443 4.68s
GET versions.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 5.3 KB ip:443 4.66s
GET viewer.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 3.4 KB ip:443 4.66s
GET fr.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 1.9 KB ip:443 4.69s
GET jquery.colorbox.js?v=12b...1e9342ffc119f6117000321 304 Not Modified domain.com 25.4 KB ip:443 4.79s
GET firstrunwizard.js?v=12b1...1e9342ffc119f6117000321 304 Not Modified domain.com 547 B ip:443 5.03s
GET fr.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 571 B ip:443 5.03s
GET bigshot.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 314.5 KB ip:443 5.02s
GET slideshow.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 17.4 KB ip:443 5.06s
GET gallerybutton.js?v=12b19...1e9342ffc119f6117000321 304 Not Modified domain.com 2.7 KB ip:443 5.08s
GET fileactions.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 730 B ip:443 5.16s
GET musicFilePlayer.js?v=12b...1e9342ffc119f6117000321 304 Not Modified domain.com 3.8 KB ip:443 5.39s
GET script.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 18.6 KB ip:443 5.4s
GET tinymce.min.js?v=12b19ab091e9342ffc119f6117000321 304 Not Modified domain.com 533.5 KB ip:443 5.41s
GET theme.min.js 200 OK (BFCache) domain.com 6.3 KB 487ms
GET plugin.min.js 200 OK (BFCache) domain.com 1.3 KB 488ms
GET plugin.min.js 200 OK (BFCache) domain.com 1.8 KB 490ms
GET plugin.min.js 200 OK (BFCache) domain.com 7.7 KB 492ms
GET plugin.min.js 200 OK (BFCache) domain.com 4.3 KB 493ms
GET plugin.min.js 200 OK (BFCache) domain.com 6.9 KB 493ms
GET plugin.min.js 200 OK (BFCache) domain.com 293 B 494ms
GET plugin.min.js 200 OK (BFCache) domain.com 1.4 KB 497ms
GET plugin.min.js 200 OK (BFCache) domain.com 508 B 498ms
GET plugin.min.js 200 OK (BFCache) domain.com 6.2 KB 496ms
GET plugin.min.js 200 OK (BFCache) domain.com 1.1 KB 498ms
GET plugin.min.js 200 OK (BFCache) domain.com 721 B 500ms
GET plugin.min.js 200 OK (BFCache) domain.com 1.5 KB 500ms
GET plugin.min.js 200 OK (BFCache) domain.com 1.9 KB 500ms
GET plugin.min.js 200 OK (BFCache) domain.com 9.7 KB 515ms
GET plugin.min.js 200 OK (BFCache) domain.com 27.7 KB 515ms
GET plugin.min.js 200 OK (BFCache) domain.com 893 B 520ms
GET plugin.min.js200 OK (BFCache) domain.com 4.3 KB 519ms
b) with assets enabled
GET /owncloud/index.php/apps/ownnote/ 200 OK domain.com 8.5 KB ip:443 2.06s
GET 6b823cf0fcdc7c7efc186520ac7228ed.css 304 Not Modified domain.com 107.4 KB ip:443 376ms
GET oc.js?v=12b19ab091e9342ffc119f6117000321 200 OK domain.com 2.0 KB ip:443 754ms
GET af7b4c1a18f878b638fee5aaa29f0634.js 304 Not Modified domain.com 1.9 MB ip:443 754ms
GET 32?requesttoken=lsC.WFe42mdDrU7af8UyHfNjiyJfQh 200 OK domain.com 926 B ip:443 1.44s
GET caret.svg 304 Not Modified domain.com 2.1 KB ip:443 1.53s
GET personal.svg 304 Not Modified domain.com 1.7 KB ip:443 442ms
GET users.svg 304 Not Modified domain.com 3.0 KB ip:443 424ms
GET admin.svg 304 Not Modified domain.com 595 B ip:443 957ms
GET help.svg 304 Not Modified domain.com 971 B ip:443 1.11s
GET logout.svg 304 Not Modified domain.com 2.4 KB ip:443 1.13s
GET files.svg 304 Not Modified domain.com 824 B ip:443 1.3s
GET mail.svg 304 Not Modified domain.com 725 B ip:443 1.44s
GET activity.svg 304 Not Modified domain.com 499 B ip:443 1.47s
GET documents.svg 304 Not Modified domain.com 830 B ip:443 1.64s
GET app.svg 304 Not Modified domain.com 698 B ip:443 1.76s
GET app.svg 304 Not Modified domain.com 1.6 KB ip:443 1.78s
GET app.svg 304 Not Modified domain.com 700 B ip:443 1.83s
GET music.svg 304 Not Modified domain.com 819 B ip:443 1.86s
GET contacts.svg 304 Not Modified domain.com 2.9 KB ip:443 2s
GET calendar.svg 304 Not Modified domain.com 941 B ip:443 2.12s
GET tasks.svg 304 Not Modified domain.com 1.9 KB ip:443 2.14s
GET apps.svg 304 Not Modified domain.com 344 B ip:443 2.81s
GET logo-icon.svg 304 Not Modified domain.com 2.8 KB ip:443 2.18s
GET search.svg 304 Not Modified domain.com 828 B ip:443 2.31s
GET breadcrumb.svg 304 Not Modified domain.com 455 B ip:443 483ms
GET part.results.html 304 Not Modified domain.com 208 B ip:443 629ms
GET 128?requesttoken=lsC.WFe42mdDrU7af8UyHfNjiyJfQh 200 OK domain.com 2.7 KB ip:443 1.3s
GET slideshow.html 304 Not Modified domain.com 721 B ip:443 636ms
GET ownnote?_=1427768687421 200 OK domain.com 23.9 KB ip:443 1.84s
GET triangle-n.svg 304 Not Modified domain.com 439 B ip:443 349ms
GET delete.png 304 Not Modified domain.com 243 B ip:443 435msPOST edit 200 OK domain.com 260.4 KB ip:443 9.08s
GET theme.js 404 Not Found domain.com 2.7 KB ip:443 1.56s
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 848ms
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 680ms
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 2.61s
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 2.73s
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 2.14s
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 1.45s
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 1.68s
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 5.4s
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 3.88s
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 6.12s
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 4.42s
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 5.15s
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 5.27s
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 7.32s
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 7.06s
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 7.67s
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 7.61s
GET plugin.js 404 Not Found domain.com 2.7 KB ip:443 7.45s
GET rename.svg 304 Not Modified domain.com 536 B ip:443 6.47s 53 requests
The address for plugin.js: https://domain.com/owncloud/assets/plugins/preview/plugin.js and theme.js : https://domain.com/owncloud/assets/themes/modern/theme.js
while without assets it loads https://domain.com/owncloud/apps/ownnote/js/tinymce/plugins/lists/plugin.min.js
I have no idea how assets works but it was recommended for gallery + (https://github.com/interfasys/galleryplus/blob/stable8/README.md) and I follow this https://doc.owncloud.org/server/8.0/admin_manual/configuration_server/js_css_asset_management_configuration.html
I've been investigating this, but it might require wholesale changes to the TinyMCE plugin. When assets is enabled, it's causing TinyMCE to look for the JS/CSS files in the assets folder, and they are not there. Asset's doesn't appropriately handle JS applets that use plugins. I can make it work with:
tinymce.baseURL = OC.linkTo('ownnote','js/tinymce');
... prior to the init of TinyMCE, but then it throws:
downloadable font: OS/2: bad linegap: -32 (font-family: "tinymce" style:normal weight:normal stretch:normal src index:1) source: http://192.168.56.101/owncloud/apps/ownnote/js/tinymce/skins/lightgray/fonts/tinymce.woff
Because skin.min.css contains:
@font-face{
font-family:tinymce;
src:url(fonts/tinymce.eot);
src:url(fonts/tinymce.eot?#iefix) format('embedded-opentype'),url(fonts/tinymce.woff) format('woff'),url(fonts/tinymce.ttf) format('truetype'),url(fonts/tinymce.svg#tinymce) format('svg');
font-weight:400;
font-style:normal
}
@font-face{
font-family:tinymce-small;
src:url(fonts/tinymce-small.eot);
src:url(fonts/tinymce-small.eot?#iefix) format('embedded-opentype'),url(fonts/tinymce-small.woff) format('woff'),url(fonts/tinymce-small.ttf) format('truetype'),url(fonts/tinymce-small.svg#tinymce) format('svg');
font-weight:400;
font-style:normal
}
And those "font" references aren't being found in the assets folder. Unfortunately I can't figure out a good way to determine if assets is enabled or not, so I can't dynamically switch with CSS file is being used. Just wanted to log the progress here.
Going to move this out to a new milestone in an effort to get some bug fixes out. It's still on the list, though.
I can confirm the same behaviour with:
nginx/1.6.2 php5-fpm/5.6.7-1 MariaDB/10.0.16
and assets enabled.
Might be worth reporting in core
since this is probably not the only app using libs like TinyMCE?
Still the same tinymce 404 errors if OC parameter 'asset-pipeline.enabled' is true: OC 8.1.3 Ownnote 1.05
Please add note regarding asset-pipeline config parameter to information section of README.md, like e.g.
- Note: You need to disable asset-pipeline parameter in your config.php to be able to show/edit your notes.
I got this error too on Debian GNU/Linux 8
and PHP 5.6.27-0+deb8u1
and Firefox 52.0a2
and config.php 'asset-pipeline.enabled' => true,
and ownCloud 9.1.1
Changing config.php 'asset-pipeline.enabled' => false,
resolved my issue with getting Ownnote editor working.
Changing config.php 'asset-pipeline.enabled' => false, resolved the issue.
Resolve the issue?, that is the issue!
Server: Ownnote doesn't work when assets is enabled
Yes you are right :), but my issue was that Ownnote editor wasn't working and the changes resolved my issue.
@enoch85 @brantje Hey guys, as you migrate over, two issues that get the most attention via emails or repeat tickets is this one. It's a byproduct of the WYSIWYG, so altering that front end as discussed could rectify it.
The other issue is mobile related and I will file a ticket there.