Skip to content
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

No CSS with Wordpress 5.3.2 #59

Open
Baptistecottey opened this issue Mar 1, 2020 · 9 comments
Open

No CSS with Wordpress 5.3.2 #59

Baptistecottey opened this issue Mar 1, 2020 · 9 comments

Comments

@Baptistecottey
Copy link

Hello,

Since i have updated my Wordpress to last version ( 5.3.2 ) it looks the CSS of wedocs isn't loaded :
image

I'm using the last plugins version.

@thebengalboy
Copy link

Do you use the weDocs theme? If yes, try changing to a default WordPress theme.

@Baptistecottey
Copy link
Author

Hello,

On the front website yes i'm using weDocs theme.
On admin this is the default wordpress admin template.

@thebengalboy
Copy link

Try changing the weDocs theme, it's not compatible with the latest WordPress. Switching to any default WordPress theme might help.

@Baptistecottey
Copy link
Author

Yes, you're right.

It works with default Wordpress theme.

Do you plan to update weDocs theme ?

@thebengalboy
Copy link

We have a different plan. Stay with us :)

Thanks

@Baptistecottey
Copy link
Author

Glad to hear it !
Thank you :)

@kamilszmit
Copy link

kamilszmit commented Mar 3, 2020

Not loading the styles is caused by errors:

Notice: Undefined offset: 0 in wp-content/themes/wedocs-develop/lib/cleanup.php on line 96
Notice: Undefined offset: 0 in wp-content/themes/wedocs-develop/lib/cleanup.php on line 97

The errors also cause styles of different plugins not to load in the WordPress admin panel. The problem is solved by modifying the function 'wedocs_clean_style_tag'. Please change the line of the script 'lib/cleanup.php' of the theme 'weDocs':

    $media = $matches[3][0] !== '' && $matches[3][0] !== 'all' ? ' media="' . $matches[3][0] . '"' : '';
    return '<link rel="stylesheet" href="' . $matches[2][0] . '"' . $media . '>' . "\n";

into:

    if (array_key_exists(3, $matches) && is_array($matches) && array_key_exists(0, $matches[3]))
    {
        $media = $matches[3][0] !== '' && $matches[3][0] !== 'all' ? ' media="' . $matches[3][0] . '"' : '';
        return '<link rel="stylesheet" href="' . $matches[2][0] . '"' . $media . '>' . "\n";
    }
    else
    {
        return $input;
    }

@Baptistecottey
Copy link
Author

Hello @kamilszmit

It works !

Thank you for your fix :)

@thebengalboy
Copy link

Hello @kamilszmit

You can create a pull request to contribute to weDocs. I believe that will help a lot of people who use and loves weDocs :)

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants