Can't change the css in SuiteCRM - css

I am working on SuiteCRM, and i want to change the CSS of my website in order to personalize it but there is an issue.
When i am changing the "style.css" of the SuiteP Theme, the pages aren't changing at all. Here is my question:
Does someone know how to change the css of this CRM and can help me to fix it ?
Thanks a lot

Make sure that your active theme is "SuiteP".
You need to know that SuiteCRM store things inside "cache" folder and you are doing changes without refreshing cache files. Cache files location will be cache/themes/SuiteP/css/style.css. So for quick changes, you can use browser developer tools.
Moreover, if you change core style.css then empty cache directory and (hard)refresh your browser. If cache files don't exist then Suite will build new using core file.

Like Star previously mentioned, Suite does cache the CSS.
Though, if you're not updating the SASS file, and just updating the CSS directly, your changes will be temporary for when the CRM next re-builds the CSS (I believe this is part of the Repair and Rebuild process in the admin section), your changes will be lost as the CSS file constructed from the style.scss file.
I'd recommend installing sass (via a gem or other means, however you choose), making changes to the scss then recompiling the css (or watching for changes if working locally, which I hope you are for working with Suite) when you've applied your changes.
If you still don't experience changes, try a repair and re-build or delete the cache directory and let it recompile on the next page load.

there are 2 options:
change core file and then delete cache contents. Refresh your page twice.
made changes in cache file. Make sure developer mood is off. Once you are done then copy it core file.

Create a new subfolder CUSTOM, copy the CSS files that are under suiteP (or the current theme) into the new custom. copy the whole path with folders, even if the folders are empty.
So the new path for the sytle.css with be /costum/theme/....../css/sytle.css
Change the file under the custom folder. The previous answers are not correct. This is well documented under the suite CRM docs.

Sometimes it doesn't work. Try next steps:
SuiteCRM better to use in development mode.
Not always the cache files deleting works for me. Better to use the tool in Admin panel - Quick Repair.
Sometimes good to clear browser cache (in dev mode reload a page by right clicking the refresh button).

Related

Css changes are not being applied in rails app

I am working on rails app and now I am having trouble.
Early when I use to change my frontend styling and apply changes in css then they quickly show up on reload in brower.
But in present, don't know but something went wrong. Whenever I change css and save it then onload, things remain same.
After debugging, I found that app is picking styling files from precompiled assets pipeline. So for the solution, I have to recompile the assets then 2 new files are generated against wach file changed. And there will be 4 files in total against a single css file in which changes are made. So now I have to delete old ones and then have to restart the serve and refreshing the browser will show all the changing and that is weird as I have to do it all the time for every single change.
I can't figure as I am new to rails. Help....
Please clear the tmp cache first and then run the server
$ rake tmp:cache:clear && rails server
If you are developing the app, you should delete public/assets directory. Then restart the app. Don't run asssts:precompile task. Your most recent changes of assets will be up to date without restart the app.
I had the same issue and found a solution : run rake assets:clobber, it will remove the precompiled css and js. Then run yarn build --watch to build back the css and js file.
Dont run the assets:build as the same issue will revert.
This might actually be a browser issue, where the browser is caching the previous CSS and not reloading your new CSS changes.
Instead of reloading the page with CTRL+R, try reloading the page with CTRL+SHIFT+R
This will force a reload of the web page and clear the page cache, which forces all the assets to reload and fixed the problem for me.
No need to run css:clobber, assets:precompile, or anything like that! Just change the way you reload your browser :)
So I have find out the reason and it was because I have run the command of assets precompile which I shouldn't have to run as rails was doing it already for me may be due to configuration of my project or may it is its default behavior.
To solve this problem I have to delete my projects folder from my system and clone it again and things got normal again.
And now I never ever going to run assets precompile command again 😂

Custom Domain not loading CSS (Azure)

The custom domain I've been using (which is already linked to an App Service in Microsoft Azure Portal) is not loading the my current styles files (.css files). Actually, it's loading older versions of those files, which I didn't create (they've had been created previously by another employee).
Has someone experienced this same issue? If I go to the website created by the App Service, the .CSS loaded there is correct (the one I've created), but whenever I go to the custom domain linked with this website, the .CSS loaded is older.
Clearing the browser cache will work locally. However, other repeat visitors will have the same issue you are having. A global method would be to rename your CSS file. That will force the browser for repeat visitor's to load the new/ current CSS file.
ex. "style.css" --> "styles.css"
Rename the CSS file and don't forget to rename the meta link as well.
Try clearing browser cache memory. CSS files are often get cached in the browsers.

Prestashop: SMARTY - force compilation / recompile when files are modified

I'm working on a Prestashop site and recently noticed about the SMARTY features (Menu: Advanced > Performance).
I realized that in order to show changes I made in the css, I must select one of the last two options (first one was selected by default).
Screenshot (I'm sorry the site is in Spanish)
1)Never recompile template files
2)Recompile templates when files are modified
3)Force compilation
My question is: when it comes to an online shop, wich option should I select until I finish editing the code? What's the difference between both?
It may take me a couple weeks to finish the job and I don't want to mess anything up.
Thank you guys.
When you're starting to dev onto the shop, whether it's front or back, you may have to choose the option to recompile when files are modified. I'm always choosing this option because it allows me to develop or debug some files and the server keeps serving cache files to the visitors.
Also you may have to edit the file defines.inc.php file in the config folder in order to define the _PS_MODE_DEV to true, for example like this :
/* Debug only */
if (!defined('_PS_MODE_DEV_'))
if (in_array($_SERVER['REMOTE_ADDR'], array('217.128.240.59')))
define('_PS_MODE_DEV_', true);
else
define('_PS_MODE_DEV_', false);
Doing this so you'll be able to get some logs when you're updating something. Placing your IP into the array keeps everyone safe from seeing the logs (notices for example).
In PS 1.6.
- Configure the SMARTY to "Recompile templates if the files have been updated" then deactivate the option "Smart cache for CSS"
- make the changes in your CSS files,
- delete the folders mentioned sadlyblue in comment.
- and activate again the "Smart cache for CSS" SAVE to recompile theme.

How to prevent WebStorm temp files constantly launch Meteor rebuilt

Each time I write something into WebStorm IDE Meteor rebuilds. Even if I don't save the files. My computer becomes noisy and hot quickly.
I am looking for a way to prevent Meteor to watch WebStorm temp files.
Does this happen when debugging your code? If yes, this must be a Live Edit issue. Try disabling Live Edit plugin - does it help?
Look at the synchronization section of the system settings page from their documentation
Here's what it says:
Synchronization
Synchronize files on frame or editor tab activation
If this check box
is selected, all the files that were changed externally are reloaded
from disk when you switch to WebStorm from a different application, or
when you you switch to their editor tab.
Save files on frame deactivation
If this check box is selected, all
modified files are auto saved when you switch from WebStorm to a
different application. Note that you cannot disable autosave
completely by turning off this and the following option. See Saving
and Reverting Changes.
Save files automatically if application is idle for N seconds
If this
check box is selected, all modified files are auto saved at regular
time internals. See also, Saving and Reverting Changes.
Use "safe write" (save changes to a temporary file first)
If this
check box is selected, a changed file is first saved in a temporary
file. If the save operation succeeds, the file being saved is replaced
with the saved file. (Technically, the original file is deleted and
the temporary file is renamed.) Also, the ownership of such file
changes. If this check box is not selected, the ownership of a file
does not change, but all the advantages of safe write will be lost.
Try unchecking those checkboxes and see if that prevents some saves.
I had a similar problem in that WebStorm was constantly saving edits to Jade files, even after typing just one character, triggering a gulp watcher. Disabling the Live Edit plugin and unchecking these boxes worked for me. Since disabling Live Edit didn't work for you, maybe unchecking one or more of these boxes will fix it.
Check this meteor specific webstorm help article. There is detailed description on how to configure live edit and code updating and how that would work together with meteor.

How to force my ASP.net 2.0 app to recompile

I have a ASP.net 2.0 app and I have made some changes the the source file ( cs files ). I uploaded the changes with the belief that it would auto-recompile. I also have the compiled dll in MY_APP/bin. I checked it and noticed that it did not recompile. Please understand I am new to this.
my #1 way to do this, add white space to the top of the web config file, after the xml declaration tag.
It forces the node to re-cache and recompile. We even have a page deep in the admin called Flush.aspx that does it for us.
I use a similar method to ChanChan, but instead of whitespace I put a comment in the web.config to indicate when/why the config was edited.
It's always best to just actually run a build after making .cs changes.
Where are you running it? Is this for debugging or production?
In VS menu you have Build -> Rebuild Solution

Resources