• Resolved ypeynaud

    (@ypeynaud)


    Hi there,

    I am a great fan of WP Symposium Toolbar, the must-have plugin for easily and fully leveraging the toolbar space in WP. Thanks and congratulations for the amazing work!

    I’ve come to a strange display behavior recently: when editing entry forms in the front end with Formidable Forms, the style of some elements of the page suddenly changed. Investigating further, I discovered that in this entry form editing situation, and only there, the wp-admin.min.css stylesheet would be loaded, taking precedence on the regular font-end styles.

    I post this here because working with the Formidable Forms plugin support on this issue over days, I deactivated all other plugins and discovered that this bug occurred ONLY when WP Symposium Toolbar was enabled (together with Formidable Forms).

    I then worked with the Formidable Forms support on a test page with only their plugin and your plugin enabled to understand which part the incompatibility could come from. And it comes to ask you the question: do you check the DOING_AJAX constant in your code? It seems that depending on your answer, the wp-admin.min.css file could be not properly loaded.

    Thanks in advance for your answer!
    Yves.

    https://wordpress.org/plugins/wp-symposium-toolbar/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Guillaume Assire

    (@alphagolf_fr)

    Yves,

    Sorry to read about the conflict. My plugin does not load wp-admin.min.css, nor does it make use of AJAX or JS, in the front-end. I am not testing on DOING_AJAX, you probably mean to check for backend-only CSS/JS files. So I’m afraid we would need to dig a little deeper.

    First, in the plugin settings pages, bottom of the Styles tab, could you try to turn off the checkbox that ‘Makes the Toolbar look the same in the backend as it does in the site frontend’ and see in the frontend if the problem remains ?

    If so then I’ll continue investigating, but I do see a potential issue here, that I’d like to preclude.

    Thanks for reporting this, have a nice day,
    Guillaume

    Thread Starter ypeynaud

    (@ypeynaud)

    Hi Guillaume,

    Thanks for the quick response. And bingo: unchecking the box ‘Makes the Toolbar look the same in the backend as it does in the site frontend’ does solve the problem!

    I don’t understand what happens exactly, but it’s working fine again for me. Your plugin has not been upgraded recently (while both WordPress and the Formidable plugin have been), so you are probably out of concern?

    I will report to the Formidable team, too, and see what they think.

    Many thanks!
    Yves.

    Plugin Author Guillaume Assire

    (@alphagolf_fr)

    My guess is that Formidable uses AJAX in the frontend ?… I see an issue on my side, in the way WPS Toolbar loads a CSS file to ‘force’ the WP default style above the color scheme the admin might chose. The dependancy of this file over the WP color scheme must also add the admin-bar CSS in the mix.

    I’m afraid I’m not checking correctly if the page displayed is actually in the backend, or a frontend page in an AJAX context. So yes, I need to change something in my plugin, I will come back later (hopefully) today with a fix in case you’d want to reactivate the Toolbar style across all pages in the backend without affecting the front-end.

    Thanks for reporting this.

    Thread Starter ypeynaud

    (@ypeynaud)

    Guillaume,

    Yes, Formidable extensively use AJAX in front-end. I think they’re right that it’s related to the DOING_AJAX checking, a lot of recommendations are available on this, including this one for example.

    And sure, I’m available to test whatever you would like me to. Just tell me. On my side, I’m no longer in a hurry since unchecking the box miraculously solved the problem for me.

    Yves.

    Plugin Author Guillaume Assire

    (@alphagolf_fr)

    Exactly… I admit I missed the second note at the Codex page for is_admin() !

    If you are able to edit code, could you open the main plugin file wp-symposium-toolbar.php and scroll down to line 109 (in version 0.31), right before the comment “Default CSS – load at ‘Styles’/’CSS’ tabs solely” and replace the test
    if is_admin() {
    with:

    $doing_ajax = ( defined( 'DOING_AJAX' ) && DOING_AJAX );
    if ( is_admin() && ! $doing_ajax ) {

    And check that when the above checkbox is ticked, the whole backend pages are reflecting the style set by the plugin, without affecting the frontend…?

    If you fear to break everything, I’ll pack the development version as a zip file for you.

    Thanks…

    Thread Starter ypeynaud

    (@ypeynaud)

    Just did that, and… working perfectly 🙂

    Happy that everything’s now working and to understand why it didn’t, too.

    Thank you for your reactivity!
    Yves.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WPST loading wp-admin.min.css on front end? check for DOING_AJAX?’ is closed to new replies.