Style file association in same directory

Seems to be an issue with being able to attach the project stylesheet to a php file where the project stylesheet is in the same directory as the file you are editing.

Ex.
root/design/index.php
root/design/css/global.css

This has worked in the past, but after recent updates I no longer have the stylesheet linked in our index.php.
The link generated is:

<link href="css/global.css" rel="stylesheet"

If I manually change to try and link from the root path,

<link href="../design/css/global.css" rel="stylesheet" Wappler automatically changes it back to the above one.

If I link a new style file in the same directory (/design) I have the same issue.
If I link a new style file outside of that directory (root/css/globaltest.css) that works.

The problem is that we have a lot of pages in this app with a lot of functions with multiple repos running, and globally changing our wappler setups to use a different CSS file is less than desired to not risk breaking other parts of the app that are non-wappler built scripts need our current main style file for.

I am not sure if there is a way to manually link a stylesheet rather than the “Attach Style File” button or if this is just a recent bug in recent versions.

Wappler Version : 4.2.2
Operating System : Windows 10
Database Type: MariaDB/mySQL

I’m not sure i understand what your issue is here.
The Attach Style File button adds the css include in the page head to the file, selected in the Style File option of your project options. I.e. this one:

So what is happening on your page - what is the issue you are having?

Sorry, I realized I actually did not describe the actual problem… :sweat_smile:

The issue is on the right side I do not have the design tab available to make CSS adjustments. If I click attack style file then nothing happens. Which prevents me from using the designer view.

So when you click the Attach Style File button - is anything added on the page, in the head tags?
Is the button disappearing?
Is this only happening on pages located in the same subfolder as the css file location, like:

design/index.php
design/css/global.css
  1. Not with the value that exists, unless if I remove the one that was generated a while back on an older version of wappler.
    " <link href=“css/global.css” rel=“stylesheet”… " This is the default. If I try to change it or get rid of it, this is what comes back.

  2. No the button always is there for this view.

  3. Correct only in the /design subfolder. Other subfolders work fine with this project style file and has been working great for a while.

The link looks correct: <link href=“css/global.css” when both files are in the design folder and the css file is in design/css/global.css then this link is correct, as the link is relative to the page (as set in your project settings).

Edit: I realized I cannot use an actual HTML tag in this forum wysiwig without using a ` so I edited up above.

Yes this looks right to me too. So I am very interested to why this does not work.

It works if I link a new style file outside of this subfolder

Thanks for the info - I was able to recreate it. Seems the css is properly linked on the page but the Design Panel doesn’t “see” it, @patrick will check this.

As for pasting code:

Thanks :slightly_smiling_face:

What’s a rough ETA on the next release containing the fix?

As usual, Thursday, tomorrow.

Fixed in Wappler 4.3.0

:slightly_smiling_face::+1: Thanks guys.

This topic was automatically closed after 42 hours. New replies are no longer allowed.