-
Notifications
You must be signed in to change notification settings - Fork 127
CSS Error #3574
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
Comments
Hi Try to do Ctrl+F5 or Ctrl+R to refresh the cache of the browser. |
I try do Ctrl+F5 or Ctrl+R several times. base.min.js?v=33bb665e24d8c1f609166c04f6b7bcaa5e207191:186 jQuery.Deferred exception: Alternatively, adding this code to formlist.php resolves all errors (masory error on javascript and css):
I know this is not the correct way to add CSS or the Masonry library, but it solved the problem. Therefore, I think the issue lies within GLPI's includes or the plugin includes. Does that make sense? |
It looks like you don't have the library masonry-layout. It is used by GLPI and the plugin should use it. Could you try this patch ? Apply it then refresh the page. diff --git a/setup.php b/setup.php
index e055b032..fbe92cfa 100644
--- a/setup.php
+++ b/setup.php
@@ -162,6 +162,10 @@ function plugin_init_formcreator() {
break;
}
}
+
+ if (strpos($_SERVER['REQUEST_URI'], 'formcreator/front/formlist.php') !== false) {
+ Html::requireJs('masonry');
+ }
}
$CFG_GLPI['javascript']['admin'][strtolower(PluginFormcreatorForm::class)] = ['gridstack']; |
The patch should affect the HTML content of the web page by adding this line <script type="text/javascript" src="/public/lib/masonry.js?v=bb1ef4841c09eda1812210167ca1141de8828aa2"></script> It is located at the end, see the screenshot below Could you check you have this line ? You may also want to check the line is not here if you revert the patch |
could you check in a separated tab that you successfully download that JS code ? |
Yes, it is But we are focused on masonry, and I think the main problem is that GLPI is not including the plugin's CSS. } else {
} |
Hi
This is possible, as there is indeed some parts broken on the page which are not related to masonry. Try to rebuild the CSS of the plugin with the CLI command from the root folder of GLPI |
It's not working. I tried bin/console plugin:formcreator:scss, but I have the same problem with the CSS. |
Hi Check that you have the file formcreator/css/styles.scss. |
Hi We did not checked if the browser tries to download scripts.min.css. Could you check in the network tab of developer tools ? Maybe there is an attempt with a HTTP return code greater or equal to 300. |
I have not got any 300 :s. I tried to delete plugin, clear plugin data and reinstall but same result |
Describe the bug
Form view dont have the correct css style
To Reproduce
Steps to reproduce the behavior:
Screenshots
Desktop (please complete the following information):
Information about system installation and configuration
Server
GLPI constants
Libraries
Plugins list
The text was updated successfully, but these errors were encountered: