Bug 361370 - Setting CSS stylesheet file for the output window via GUI fails
Summary: Setting CSS stylesheet file for the output window via GUI fails
Status: RESOLVED FIXED
Alias: None
Product: rkward
Classification: Applications
Component: User Interface (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: RKWard Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-04 10:08 UTC by Alfredo Sánchez Alberca
Modified: 2016-04-05 18:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alfredo Sánchez Alberca 2016-04-04 10:08:06 UTC
---Problem description---
When I set the CSS stylesheet file for the output windows I get the following error 
Error: unrecognized request 'getCSSlink'.

Por favor, proporcione un breve resumen del problema:
After setting the CSS stylesheet file via the settings menu the output windows hml file doesn't contains a valid link to the CSS stylesheet file.

¿Qué hizo exactamente antes de encontrar este problema? (Sea lo más detallado posible)
Go to Settings > Output window settings > Output and select a CSS file. 

¿Se presenta de nuevo el problema cuando intenta repetir los pasos anteriores (no, a veces, siempre)?
Yes

Si procede: ¿ocurre también al hacer lo mismo en una sesión de R sin usar RKWard?
###Rellene esto, por favor###

¿Posee más información que pueda ayudarnos a solucionar este problema? En particular, si procede, ¿puede facilitarnos datos y código R de ejemplo con los que se pueda reproducir el problema?
Probably the problem is with a getCSSlink function or method.

RKWard está disponible en diversos paquetes, por lo que a veces los problemas pueden derivarse del método de instalación seguido. ¿Cómo ha instalado RKWard (qué archivos ha descargado)?
###Rellene esto, por favor###


---Session Info---
-- Frontend --
RKWard version: 0.6.5
KDE version (runtime): 4.14.13
KDE version (compile time): 4.14.13
Qt build key: x86_64 linux g++-4 full-config
Local KDE directory: /home/alf/.kde/
RKWard storage directory: /home/alf/.rkward/
Backend version (as known to the frontend): 3.2.4

Debug message file (this may contain relevant diagnostic output in case of trouble):
/tmp/rkward.frontend.T11163

-- Backend --
Debug message file (this may contain relevant diagnostic output in case of trouble):
/tmp/rkward.rbackend.J11169

R version (compile time): 3.2.4 Revised (2016-03-16 r70336)
R runtime session info:
R version 3.2.4 Revised (2016-03-16 r70336)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 15.10

locale:
 [1] LC_CTYPE=es_ES.UTF-8          LC_NUMERIC=C                 
 [3] LC_TIME=es_ES.UTF-8           LC_COLLATE=es_ES.UTF-8       
 [5] LC_MONETARY=es_ES.UTF-8       LC_MESSAGES=es_ES.UTF-8      
 [7] LC_PAPER=es_ES.UTF-8          LC_NAME=es_ES.UTF-8          
 [9] LC_ADDRESS=es_ES.UTF-8        LC_TELEPHONE=es_ES.UTF-8     
[11] LC_MEASUREMENT=es_ES.UTF-8    LC_IDENTIFICATION=es_ES.UTF-8

attached base packages:
 [1] splines   stats4    grid      stats     graphics  grDevices utils    
 [8] datasets  methods   base     

other attached packages:
 [1] rk.Teaching_1.0       prob_0.9-5            VGAM_1.0-0           
 [4] hypergeo_1.2-11       fAsianOptions_3010.79 fOptions_3022.85     
 [7] fBasics_3011.87       timeSeries_3022.101.2 timeDate_3012.100    
[10] combinat_0.0-8        ez_4.3                Hmisc_3.17-0         
[13] Formula_1.2-1         survival_2.38-3       lattice_0.20-33      
[16] e1071_1.6-7           car_2.1-1             R2HTML_2.3.1         
[19] plyr_1.8.3            ggplot2_2.0.0         rkward_0.6.3         

loaded via a namespace (and not attached):
 [1] deSolve_1.12        reshape2_1.4.1      colorspace_1.2-6   
 [4] mgcv_1.8-9          nloptr_1.0.4        foreign_0.8-66     
 [7] RColorBrewer_1.1-2  stringr_1.0.0       MatrixModels_0.4-1 
[10] munsell_0.4.2       gtable_0.1.2        elliptic_1.3-5     
[13] contfrac_1.1-9      labeling_0.3        latticeExtra_0.6-26
[16] SparseM_1.7         quantreg_5.21       pbkrtest_0.4-6     
[19] parallel_3.2.4      class_7.3-14        proto_0.3-10       
[22] Rcpp_0.12.2         acepack_1.3-3.3     scales_0.3.0       
[25] lme4_1.1-11         gridExtra_2.0.0     stringi_1.0-1      
[28] tools_3.2.4         magrittr_1.5        cluster_2.0.3      
[31] MASS_7.3-45         Matrix_1.2-4        minqa_1.2.4        
[34] rpart_4.1-10        nnet_7.3-12         nlme_3.1-126
Comment 1 Thomas Friedrichsmeier 2016-04-04 14:16:41 UTC
Hi!

This is a problem in your installation:

> ---Session Info---
> -- Frontend --
> RKWard version: 0.6.5
[...]
> other attached packages: [...] rkward_0.6.3

How did you install? Don't you get a nag-dialog about mismatching versions?

Regards
Thomas

---

N.B.: In the past I did occasionally forget to bump the rkward R package's version number. But this is now part of our release scripts, and I have checked that I really did adjust the version for 0.6.5.
Comment 2 Alfredo Sánchez Alberca 2016-04-05 13:28:37 UTC
You are right! 
I don't know wy in mi local R library the version of package rkward is 0.6.3. 
So I've removed the package and repeated the installation using the inofficial ubuntu repositories. 
Now whe RKWard stats I get the error:

- The 'rkward' R-library either could not be loaded at all, or not in the correct version. This may lead to all sorts of errors, from single missing features to complete failure to function. The most likely cause is that the last installation did not place all files in the correct place. However, in some cases, left-overs from a previous installation that was not cleanly removed may be the cause. 

Details: 
Attaching package: ‘rkward’

The following objects are masked from ‘package:grDevices’:

quartz, x11, X11

The following objects are masked from ‘package:base’:

makeActiveBinding, q, quit, require, setwd, Sys.setlocale

Error: .rk.app.version == "0.6.5" is not TRUE
starting httpd help server ... done

After closing the window RKWard seems to work properly except when seleceting a CSS worksheet fiel that the problem persist. 
Thanks Thomas!
Comment 3 Alfredo Sánchez Alberca 2016-04-05 14:36:18 UTC
Hi again!
The error was produced because I also had an old version of rkward package in the path "/usr/local/lib/R/site-library". It is supposed that the new rkward versions will overwrite this package but the 0.6.5 version is in the path "/usr/lib/R/site-library", so both versions existed. 
Now I've removed the old version and updated libPath and RKWard starts without trouble. 

Regarding to the CSS worsheet, now I don't get the Error: unrecognized request 'getCSSlink', but when I set the path to the CSS file and flush the ouput, the new output windows continues to use the same CSS file.
Comment 4 Thomas Friedrichsmeier 2016-04-05 18:29:08 UTC
Oops. I messed up the graphical option, indeed. In fact, if you go back to settings, you will see that your custom CSS-file setting has simply been forgotten. Will fix, soon.

Workaround until a fix is released: Add
   options ("rk.output.css.file"="whatever.css")
to Settings->R Backend->Further (option) commands...
Comment 5 Thomas Friedrichsmeier 2016-04-05 18:36:33 UTC
Git commit a3fa002f3b4571e487bc2c715b8be88374e0dee2 by Thomas Friedrichsmeier.
Committed on 05/04/2016 at 18:35.
Pushed by tfry into branch 'releases/0.6.5'.

Fix setting output CSS file via GUI.

M  +2    -1    ChangeLog
M  +3    -1    rkward/settings/rksettingsmoduleoutput.cpp

http://commits.kde.org/rkward/a3fa002f3b4571e487bc2c715b8be88374e0dee2