When adding external classes (Stylesheets > External Classes) I create a folder and Import some classes to it. So far so good. But after some time, suddenly, the classes are gone. So is the external class folder.
The classes connected to elements (divs, images etc.) are still there only the coloring is gone. I also have to re-create the folder and re-import the classes again.
I can’t figure out when it happens, seems random.
Before i report this as a bug… am I missing something?
Cwicly version: 1.3.4.2 (was already a problem with earlier versions)
WordPress: 6.3.2 (and earlier)
The only time I have seen this is when there are multiple instances of Cwicly running at the same time (either used by a single developer or multiple) and for whatever reason global classes / stylesheets are saved without properly syncing. The Cwicly heartbeat normally takes care of this either implicitly or by showing a dialog prompting you to reload the global classes.
Despite the fact that Cwicly handles this, when working as a team on a website we usually manage the work so that only one person is responsible for updating the globals at any given time, just as a precaution to avoid this.
If you don’t have multiple people working on the site and don’t have multiple tabs open, then this may be something different.
I made the same observation while adding a lot of classes from the “core framework”. But I made sure that there are no parallel sessions in tabs open to not confuse heartbeat. Sadly, I just randomly encounter the automatic removal of the classes. It could be that there are a lot of classes and the loading lags a bit so they are not visible in the class selector right after refreshing the page.
Sorry to hear you’ve been having trouble with external classes disappearing.
So that we can keep track of this and see to it, I’m moving this to Bugs and will take a look at it in a bit.
Thanks for your patience on this one and my apologies for the trouble.
Would you mind opening a new thread as not linked to external classes?
I cannot reproduce this on my end. Can you make sure there is no error in your stylesheet that you might have introduced?
Also, there is no Global Stylesheets regeneration.
Looks like it happened to me again. What’s more odd is last time I saved them to my cloud library, but trying to import them only adds an empty unnamed folder.
Having the same issues here with disappearing external styles. I’m on the latest Cwicly 1.3.4.5. Like others on here I’ve tried to troubleshoot, but can’t seem to pinpoint why this is happening. They just randomly seem to disappear.
I’ve had this happen randomly several versions back, so I stopped using that feature and started adding the classes programmatically via the functions file. It’s not as easy to import new classes this way, but has been working reliably. I’m not sure if this is the same issue that was causing mine to disappear, but I would actually prefer to use the import method within Cwicly so I don’t have to maintain the additional code.
Has anyone been able to paste external classes after the latest update?
Wanted to restore my external classes now that the issue has been fixed, but when pasting, the browser either freezes up or I get this error when trying to “Replace All”:
TypeError: r.map is not a function
at _k (https://domain.com/wp-content/plugins/cwicly/build/index.js?ver=1.3.4.6:3:3392946)
at wt (https://domain.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:47637)
at vr (https://domain.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:56452)
at js (https://domain.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:121453)
at wl (https://domain.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:88659)
at bl (https://domain.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:88587)
at yl (https://domain.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:88450)
at il (https://domain.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:85274)
at fl (https://domain.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:85661)
at Nn (https://domain.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:32474)
EDIT: Seemed to work when I copied all and replaced all.
Wasn’t working when I copied all and pasted, or if I copied one and replaced all.
Not meaning to hijack the thread, but let me place this in the current context:
Would it be possible to re-work the current way of integrating external CSS, so that we don’t have to paste the CSS twice, to have the class suggestions appearing in the appropriate modal?
Pasting the actual code in a new Global Stylesheet
Switch to “External Classes” and paste the code all over again, so the classes get visible in the class selector modal.
I can’t retrace this extra step and guess that you wanted to leave the choice up to the user to have the classes visible in the modal. I think this is a good option to have, but overcomplicated to use in the current state. Especially when adopting the folder logic.
A small UX suggestion for that could be to introduce a toggle button to allow for the automatic population of the class names in the “Class” modal.
Referring to your statement:
Incorporating static files into the system would be quite useful, but I can imagine that his could lead to a lot of effort on your side providing CRUD for these assets. Maybe a more global approach not restricted to user CSS alone would open up cwicly as well. Is there a thread for that already?