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

Piwik auf IIS im shared hosting erzeugt fehlerhafte CSS-Datei #5399

Closed
anonymous-matomo-user opened this issue Jul 2, 2014 · 3 comments
Closed
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@anonymous-matomo-user
Copy link

Beim Einsatz von Piwik auf einem IIS-Server im shared hosting wird eine fehlerhafte CSS-Datei erzeugt, die die Benutzung von Piwik nahezu unmglich macht.
Dies liegt daran, dass vom Asset-Manager die @import-Pfade nicht aufgelst werden knnen, wenn der volle Pfad angegeben ist und nicht auf alle Elemente des Pfades eine Leseberechtigung vorhanden ist. Das ist aber beim shared hosting typischerweise der Fall.

In unserem Fall sah der Pfad wie folgt aus:
":/FTP/Kundennummer/Domain/web/piwik/plugins/..."
Es fehlte also am Anfang auch noch der Laufwerksbuchstabe!

Als Workaround haben wir in der Klasse StylesheetUIAssetMerger in die Funktion getCssPathsRewrite am Schluss folgende Zeile eingefgt:
$publicPath=str_replace(':/FTP/Kundennummer/Domain/web/piwik/', '', $publicPath);
Damit funktioniert das Piwik jetzt.
Es wre schn, wenn dieser Bug im nchsten Release beseitigt sein knnte.
Vielen Dank!

@anonymous-matomo-user
Copy link
Author

English translation:

When using Piwik on an IIS server in a shared hosting environment, defective CSS files are created, which make the use of Piwik almost impossible.
This is because the Asset Manager cannot resolve the @import paths if piwik does not have the read right for all elements in the path. But this is typically the case in a shared hosting environment.

In our case, the path was as follows:
":/FTP/CustNo/domain/web/piwik/plugins/..."
(The drive letter is missing at the beginning)

As a workaround, we have inserted in the StylesheetUIAssetMerger class in the getCssPathsRewrite function:
$publicPath = str_replace (':/FTP/CustNo/domain/web/piwik/','', $publicPath);

It would be nice if this bug could be removed in the next release.
Thank you so much!

@anonymous-matomo-user anonymous-matomo-user added this to the 2.5.0 - Piwik 2.5.0 milestone Jul 8, 2014
@tsteur tsteur self-assigned this Jul 19, 2014
tsteur added a commit that referenced this issue Jul 19, 2014
…s expected, took me a long time to kinda understand this method). Maybe also fixes the issue.
@tsteur
Copy link
Member

tsteur commented Jul 19, 2014

Hi,

I'm still trying to understand this problem but I'm not really sure if I understand it. I made a change which could help but probably not. Have you replaced $public_path rather at the beginning or at the very end? I do not really understand why this variable should contain the whole path at all. Maybe someone else wants to have a look as well?

If I understand the code correct $public_path should only contain a relative path such as plugins/PluginName/images/file.gif.

@tsteur
Copy link
Member

tsteur commented Aug 6, 2014

Closing this issue for now. It might be fixed but I cannot tell for sure without the help of the creator of the issue. Please reopen at any time in case it is not fixed

@tsteur tsteur closed this as completed Aug 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

3 participants