stevendaryl
I manually installed the 'wrap' plugin (I cannot get the admin functions to work, for reasons that are a different topic), and it seems to work, in the sense that if I "inspect" a wrapped bit of text (to see the html), the correct html tags and classes are being applied. But none of the styles are being applied, so wrapped text looks no different than unwrapped.
Maybe I missed some critical part of the installation process. How can I make sure that a plugin's css is being applied correctly?
lpaulsen93
Can you show the code snippet that is using the wrap plugin?
stevendaryl
<WRAP info>This might be a wrap</WRAP>
That gets correctly translated into (as I can see by viewing the html source):
<div class="wrap_info plugin_wrap">
<p>
This might be a wrap
</p>
</div>
The point, as I said, is that the css styles for wrap_info and plugin_wrap are not being applied.
aleksandr
Screenshot?
stevendaryl
There's nothing to see: It doesn't do anything.
<WRAP info>This might be a wrap</WRAP>
Looks exactly as if I had entered
This might be a wrap
I don't know how to upload a screenshot, but I can't imagine that you could learn anything by it. There's just the words "This might be a wrap." on an otherwise empty page (except for the Dokuwiki logo, etc.).
stevendaryl
Okay, I found a site where I can upload an image. So the screenshot is this:
lpaulsen93
Hmmm...you could check the CSS code in the page source. There should be a line like this:
<link rel="stylesheet" type="text/css" href="/lib/exe/css.php?t=dokuwiki&tseed=e96e64818c9a1035da3ab8f6ba45ad30"/>
Follow the link and you will see the CSS code. In that the wrap classes should be included. But I assume the CSS is missing.
Maybe you should fix the problem with the admin functions first. It could be that some permissions are not set properly and who knows what effects that might have.
stevendaryl
Yes, the problem is that css.php is not returning all of the css. But I don't understand why not.
The admin functions have never worked for me. I'm not sure why not, but since I have access to the dokuwiki source, I've always been able to directly modify it when necessary.
It's possible the reason that admin doesn't work is because I'm using my employer's machine, and I don't have administrator privileges.
lpaulsen93
Ok, if you haven't got admin rights how did you install the wrap plugin? Is it properly installed? The plugin folder name is wrap only, nothing more (not the name of the zip file). Do all files in the wrap folder have the correct owner (webserver user, e.g. www-data)?
lpaulsen93
css.php is managing a buffer and all print output is going to that buffer. So with the print commands the CSS code is build. If you also use the print command then your output will become part to the generated CSS code. Better try logging, see
https://www.dokuwiki.org/devel:debugging.
stevendaryl
This is embarrassing, but it suddenly started working correctly, after several days of not. The only thing I did was to attempt to put in some debugging statements into the php. The only explanation I can come up with is that maybe something was being cashed, and so the plugin's css.php wasn't being called, but it was instead using cached css?
lpaulsen93
Hmmm...as far as I know the CSS code is cached. But I de-installed and installed the wrap plugin quite often and never had problems with missing wrap CSS. Anyway, good to hear that it's working now :-)
stevendaryl
As I understood from the manual installation instructions, it's only necessary to unzip and put everything into the appropriate location:
.../dokuwiki/lib/plugins/wrap
Inside this, are the files and directories:
* _test (directory)
* conf (directory)
* images (directory)
* lang (directory)
* syntax (directory)
* all.css
* print.css
* style.css
* COPYING
* README
* action.php
* helper.php
* example.txt
* plugin.info.txt
* .travis.yml
lpaulsen93
That's ok. Sometimes if you unzip it the folder gets a different name.
What are the permissions of that files/folders?
stevendaryl
Yes, I had to rename the outer folder to "wrap". I can't remember what it was originally.
All of the files have the following permissions:
Authenticated Users: Modify, Read & execute, Read, Write
SYSTEM: Full control, Modify, Read & execute, Read, Write
Administrators: Full control, Modify, Read & execute, Read, Write
Users: Read & execute, Read
So ordinary users can't modify or write. Presumably, that's okay, right? It's all read-only.
stevendaryl
I'm just wondering what the process is for fetching css from plugins. It's obviously not working, but if I knew what the process was, maybe I could debug it. Where is the php code for doing that?
lpaulsen93
The only idea I have would be a file permission issue.
Anyway, the code for the css generation is in lib/exe/css.php[/m]. The CSS code for the plugins is generated in the function [m]css_pluginstyles().
stevendaryl
Hmm. Apparently, css.php is not being run at all. I used ChromePhp to print debug statements to the console, and I'm not getting anything.
https://github.com/ccampbell/chromephp/blob/master/ChromePhp.php
(In contrast, I do get something from 'doku.php')
stevendaryl
That's not true. It's being called, but the debugging doesn't work from within it.