Rhym / silverstripe-cms-theme

Theme for the Silverstripe CMS
https://packagist.org/packages/ryanpotter/silverstripe-cms-theme
MIT License
39 stars 21 forks source link

we are getting weirdness in the collapsible menu - sometimes #35

Open sunnysideup opened 5 years ago

sunnysideup commented 5 years ago

image

and on hover:

image

arrows are seen on scrollbar:

image

<link rel="stylesheet" type="text/css" href="/resources/vendor/silverstripe/admin/client/dist/styles/bundle.css?m=1560140517" />
<link rel="stylesheet" type="text/css" href="/resources/vendor/cwp/cwp-core/css/custom.css?m=1552349630" />
<link rel="stylesheet" type="text/css" href="/resources/vendor/dnadesign/silverstripe-elemental/client/dist/styles/bundle.css?m=1551992966" />
<link rel="stylesheet" type="text/css" href="/resources/vendor/dnadesign/silverstripe-elemental-virtual/css/elemental-admin.css?m=1554869302" />
<link rel="stylesheet" type="text/css" href="/resources/vendor/silverstripe/cms/client/dist/styles/bundle.css?m=1560143644" />
<link rel="stylesheet" type="text/css" href="/resources/vendor/silverstripe/tagfield/client/dist/styles/bundle.css?m=1555300197" />
<link rel="stylesheet" type="text/css" href="/resources/vendor/silverware/calendar/admin/client/dist/styles/bundle.css?m=1528784751" />
<link rel="stylesheet" type="text/css" href="/resources/vendor/symbiote/silverstripe-advancedworkflow/client/dist/styles/advancedworkflow.css?m=1550735414" />
<link rel="stylesheet" type="text/css" href="/resources/geocodeable/client/css/screen.css?m=1562299338" />
<link rel="stylesheet" type="text/css" href="/resources/vendor/ryanpotter/silverstripe-cms-theme/dist/main.css?m=1553814012" />
<link rel="stylesheet" type="text/css" href="/resources/vendor/silverstripe/asset-admin/client/dist/styles/bundle.css?m=1560071218" />
<link rel="stylesheet" type="text/css" href="/resources/vendor/silverstripe/campaign-admin/client/dist/styles/bundle.css?m=1558301533" />
<link rel="stylesheet" type="text/css" href="/resources/vendor/silverstripe/subsites/css/LeftAndMain_Subsites.css?m=1549792353" />
<link rel="stylesheet" type="text/css" href="/resources/vendor/silverstripe/sharedraftcontent/client/dist/styles/bundle-cms.css?m=1533611528" />
<link rel="stylesheet" type="text/css" href="/resources/vendor/silverstripe/versioned-admin/client/dist/styles/bundle.css?m=1558301281" />
<link rel="stylesheet" type="text/css" href="/resources/vendor/symbiote/silverstripe-gridfieldextensions/css/GridFieldExtensions.css?m=1539985968" />
<link rel="stylesheet" type="text/css" href="/resources/vendor/silverstripe/admin/client/dist/styles/browser-warning.css?m=1560140517" />

when it first loads, it looks great and THEN goes all weird! JS Issue?

Rhym commented 5 years ago

Can't say I've ever come across this. Do you have any modules that change the menu in any way? This theme doesn't inject any JS.

Rhym commented 5 years ago

Oops, accidentally closed it. Please still reply 😂

sunnysideup commented 5 years ago

It happens when you open a specific page.

sunnysideup commented 5 years ago

"Do you have any modules that change the menu in any way? " - that is the question ;-) I am not sure. It only happens when an individual page is opened in the CMS.

sunnysideup commented 5 years ago

CORRECT MENU: image

BAD MENU: image

Looks like the HTML is being edited!

sunnysideup commented 5 years ago

Here is how we fixed it ...

/**
 * Side menu labels were dissappearing
 * when editing pages in the CMS. This bug was due to the 3rd party library
 * thinking the side menu was collapsed then failing to properly collapse the sidemenu
 * The bug is present in the vendor folder so this script sets specific cookies to trick the 3rd
 * party code into thinking the side menu is always pulled out
 *
 * @author Tristan Mastrodicasa
 */

jQuery.cookie("cms-menu-sticky", "true", {
    path: "/",
    expires: 31
});

jQuery.cookie("cms-panel-collapsed-cms-menu", "false", {
    path: "/",
    expires: 31
});

jQuery.cookie("cms-panel-collapsed-cms-content-tools-CMSMain", "false", {
    path: "/",
    expires: 31
});
vignesh511989 commented 2 years ago

Hi @sunnysideup ,

I'm facing the same issue. could you please tell me where and how did you add this script?

Thanks Vignesh

Firesphere commented 1 year ago

Collapsing has been resolved in #64