CSS in Custom Pages

ronsegal

New member
You are using DaDaBIK version 8.3-Lerici enterprise, installed on 06-10-2018 (installation code: 0), the latest version of DaDaBIK is

released on --
You are not running the last release of DaDaBIK, the release you are running might have bugs and security holes, see the official change log for further information. You can upgrade DaDaBIK here.
PHP Version: 7.0.30-0ubuntu0.16.04.1
mysql version: 5.7.22-0ubuntu0.16.04.1
Web server: Apache/2.4.18 (Ubuntu)
Client: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36

Hi Guys / Eugenio
Firstly, is the above report 'you are not running...' expected? As the latest version is certainly running. Just in case, downloaded an 'upgrade' but it is the same.

Anway, the more important issue is that I'm trying to create a custom html page (not php), which contains references to css and js files. The problem is that the css links are being stripped.

So pasting this:

<!DOCTYPE html>
<html>
<head>
<title>FlashGen</title>
<link rel="stylesheet" href="static/css/bootstrap.min.css">
<link rel="stylesheet" href="static/css/font-awesome.min.css">
<script src="static/js/jquery-3.3.1.min.js"></script>
<script src="static/js/bootstrap.min.js" type="text/javascript"></script>
<script src="static/js/paho-mqtt-min.js"></script>
<script src="static/js/frontend.js"></script>
<meta name="viewport" content = "width=device-width, initial-scale=1.0">
</head>
<body>
<div class="container">
<div class="jumbotron">
<h1>Generate Flash Files</h1>
... etc

Saving and opening source gives this:

<p><br /><br />FlashGen<br /> <br /> <br />
<script src="static/js/jquery-3.3.1.min.js"></script>
<br />
<script src="static/js/bootstrap.min.js" type="text/javascript"></script>
<br />
<script src="static/js/paho-mqtt-min.js"></script>
<br />
<script src="static/js/frontend.js"></script>
<br /><br /><br /></p>
<div class="container"><br />
<div class="jumbotron"><br />
<h1>Generate Flash Files</h1>
<br />
... etc

Is there any way to prevent the CSS links from being stripped?

Also, I tried creating the same custom page in a copy of dadabik installed inside wordpress, with the wordpress plugin enabled. This created a login loop. The username/password were being accepted (i.e. no error as with a bad login) then looping back to login. Tried deleting the custom static page directly in the database but this didn't resolve the login issue.

Suggestions appreciated as to why this happened and what to try to restore access without re-installing dadabik.

A different copy of dadabik, outside of wordpress, logs in ok, accessing the same database.

Thanks in advance, Ron
 

ronsegal

New member
So the simple answer having thought this through. It that the CSS gets stripped so as to integrate the page into the site's template theme. To create a static html page with its own CSS would require implementing an index.html (or similar) page in its own directory then pointing to that. Presumably logon sessions then wouldn't apply to that page.

So the page will need to be redeveloped without own CSS.

Still no idea why the login loop.
 

eugenio

Administrator
Staff member
Hello Ron,
I'll try to answer to all your questions:

- the "you are not running" issue affects some users (depending on the environment) and we are trying to solve it

- as you discovered by yourself, a custom page shares header and footer (including CSS) with DaDaBIK so you shouldn't provide the whole html of the page. You can, however, use the style attribute in your html or add your custom styles at the end of the styles_screen.css file (if they don't interfere with the general styles).
If you want to work manually with the HTML code of your page, probably the best solution is to declare the page as a PHP custom page and then edit the .php file as it was a normal HTML file.

- as far as I have understood, the problem with the wordpress login is not related to custom pages, right? You have a general problem logging in DaDaBIK if your DaDaBIK app is embedded in Worpdress?

Best,
 

ronsegal

New member
Hi Eugenio

Apologies. Only just seen your reply, which wasn't expected but very welcome!
For the time being I've put Wordpress to one side. Really just trying it out as a potential method to integrate a dadabik database front-end with some other non php pages (actually Python Flask and Javascript). Am sure there is a better approach with dadabik customisations. Again though, no time to pursue right now.
However, yes, the login loop was with dadabik inside Wordpress. Really unsure how or why that started.

Cheers
Ron
 
Top