Project

General

Profile

Actions

Support #7910

open

Pointing to CSS file : absolute path is ignored

Added by S ET about 4 years ago.

Status:
New
Priority:
Low
Assignee:
-
Target version:
-
Start date:
12/12/2020
Due date:
% Done:

0%

Estimated time:

Description

In an unusual application starting setup, I wish to use

export WT_APP_ROOT=/absolute/to/app/root
cd /any/where
/absolute/to/app --docroot /absolute/to/some/where/else ...

CSS fails to work as such :

string cssFile = WApplication::appRoot() + string("file.css");
WLink cssLink(cssFile);
WApplication::useStyleSheet(cssLink);

It works if cssFile is relative to CWD :

CSS works as expected here :

cd /absolute/to/app/root
export WT_APP_ROOT=.
/absolute/to/app --docroot /absolute/to/some/where/else ...

and here :

cd /absolute/to/app/
export WT_APP_ROOT=./root
/absolute/to/app --docroot /absolute/to/some/where/else ...

In all these cases, other resources like an Sqlite db are found in app root.

In brief, it seems that CSS breaks when the link to the CSS file is not relative to CWD.

Throughout the testing, the browser's cache directory has been deleted before each run.

What is the recommended way of pointing to a CSS file ?

Thank you.

No data to display

Actions

Also available in: Atom PDF