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

Manager slightly destroyed #53

Open
inreti-sb opened this issue Mar 18, 2021 · 13 comments
Open

Manager slightly destroyed #53

inreti-sb opened this issue Mar 18, 2021 · 13 comments

Comments

@inreti-sb
Copy link

inreti-sb commented Mar 18, 2021

Manager slightly destroyed (light grey bar on top inserted, some CSS statements like padding of menu-item etc. not applying) on first request after flushing cache.

Screenshot:
Screenshot_2021-03-18 Dashboard polls bug

On reload (from cache) everything is fine again.

In Developer Tools the title- and meta-tags and all external CSS- and JS-links seem to be moved from head- to body-section!

Even though this extra seems to be very old and unmaintained.. does anyone has an approach?

MODX Revolution 2.8.1-pl
polls 1.3.2-pl
PHP 7.4.16
Ubuntu 18.04.5 LTS
Apache 2

@Jako
Copy link

Jako commented Mar 18, 2021

Since Raffy had the same solution for the problem, I looked through the code and this line can be the cause of the issue:

https://github.com/himurovich/MODX-Polls/blob/master/core/components/polls/controllers/mgr/polls_header.php#L14

There is no cleaning on the value …

It has to be removed there. After that MODx.request has to be used in the JS code of the extra replacing Polls.request.

@matdave
Copy link

matdave commented Mar 18, 2021

@Jako can you test the PR I submitted. I was unable to "break" my manager, so can't recreate.

@Jako
Copy link

Jako commented Mar 18, 2021

I don’t think that the Polls.request value is used somewhere. But I never had that extra installed on my own pages and just saw the result on another site. It was visible from time to time and seemed not reproducible. Maybe @inreti-sb can test it.

@inreti-sb
Copy link
Author

Thanks @Jako and @matdave! Unfortunately this PR does not fix it.
Does someone needs manager/server access to debug and test it?

@Jako
Copy link

Jako commented Mar 19, 2021

Do you have a way to reproduce the issue?

@inreti-sb
Copy link
Author

On three of my sites I tested so far (on two different v-servers).. install the extra "polls".. refresh page.. manager is slightly destroyed.

@Jako
Copy link

Jako commented Mar 19, 2021

Installing can be done only once. Is it somehow else reproducible after? You told about the first request after clearing the cache. I just have to create a test situation, wether the issue is gone.

@inreti-sb
Copy link
Author

I can reproduce this everytime I clear the cache (or reinstall the extra).. afterwards the manager is destroyed, but only on the first request.
On every further (cached) request and after uninstalling or deactivating the extra, the appearance is fine again.
I will try to reproduce this on a fresh instance without further extras installed.

@inreti-sb
Copy link
Author

Okay.. I just reproduced this on a fresh 2.8.1 (advanced) installation with no additional extras. Hope that helps.

Jako added a commit to Jako/MODX-Polls that referenced this issue Apr 7, 2021
Jako added a commit to Jako/MODX-Polls that referenced this issue Apr 7, 2021
@Jako
Copy link

Jako commented Apr 7, 2021

Can you check this patch?

@inreti-sb
Copy link
Author

Jiiiha, this patch seem to work for me. Thanks a lot, @Jako!

@Jako
Copy link

Jako commented Aug 31, 2021

@himurovich Can you merge the fix and release a new version?

@ant-tar
Copy link
Owner

ant-tar commented Sep 1, 2021

Sure I will do @Jako Thanks a lot!

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

4 participants