Plone custom viewlets.xml not being picked up - plone

Quoting http://plone.org/documentation/kb/customizing-main-template-viewlets/tutorial-all-pages (about 1/4 of the page down)
If all you need is to reorder the viewlets in the Plone Default skin, you can simply copy the original viewlets.xml from CMFPlone/profiles/default/ into MyTheme/profiles/default/, and edit the copied file to make it reflect your needs.
When I do just that, I get no changes, not after reloading, not after a buildout, not anyhow. I did some slight manual changes to MyTheme/browser/templates/main_template.pt, which are picked up, so it is not so, that my product is ignored at all. So far I did not touch any essential code there, so this cannot be the reason.
This is for a plone 3.3.5 install. Anybody could give me clue here? Any infos needed, I am standing by :)

GenericSetup profiles need to be explicitly loaded, they are not loaded on start-up.
You can do this by either reinstalling your package in the QuickInstaller. Alternatively, you can just re-import just viewlets.xml via the setup tool. You'll find that tool in the ZMI (look for the portal_setup tool):
Once there you select the Import tab:
You'll then have to find your package profile in the drop-down list:
The tab will automatically reload once you make your choice. Scroll down to the "Viewlet Settings" step and check it's checkbox:
Then finally, uncheck the "Include dependencies?" checkbox at the bottom and click the "Import selected steps" button:

You need to reinstall the product from portal_quickinstaller

Every xml files under profiles/XXX are meant to be configuration 'profile' It means it is not a configuration file but a profile. So you need to apply the profile.
Buildout has to be run when you have changes like add/remove/update eggs or eggs dependencies (setup.py).
Restarting zope is needed when you have made changes to python files outside of skins directories or you have made changes to zcml files. Note changes on templates, css, js do not need restart except if you are in production mode.
How to apply a profile:
Default profile can be applyed throw the add-on activation panel (aka Quick Installer)
If you just want to apply one step (this is your case) you can go to ZMI in portal_setup, Select import tabs and select the viewlets step and submit the form.

Related

Can't change the css in SuiteCRM

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).

Can I use dev tools persist with live site?

Trying to use Dev Tools Persist. Had a lot of trouble adding folder but eventually that worked. Folder is faded out and I can't "Map to File System Resource" (right click only shows this:
I tried using the "show editor in console" experiment (here and here) as a workaround but could never find it, despite enabling experiments.
I'm using dev off the live site. I don't control the site so don't have access to local files. I only need to update styles.
thanks!
Had the same problem, missing "Map to File System Resource". When my source maps included sourcesContent, the file mappings were automatically made and I could live edit my scss. Apparently chrome uses the content to find the right file.
node-sass --source-map-contents

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 open a file with a single click in atom1.7+ (no pending panes)

After having upgraded atom from 1.5 to 1.7 I discover a new "feature" that is not practical: all files that are single-clicked are now open in a "pending pane", what means that if nothing is changed in the file, it will be replaced by the next opened file.
It's possible to disable the "pending panes" feature in the settings of atom.
But I also would like to restore the previous behaviour (a single click on the file in the tree view will open the file).
The "tree-view" package settings allow to edit keybindings, but I haven't found anything about mouse clicking.
If you open up Settings from File -> Settings or with Ctrl-Comma there is a setting right at the top of "Core Settings" to Allow Pending Panes, uncheck this to disable the Pending Pane functionality:
Unfortunately restoring the 'single-click' functionality to the TreeView isn't a configurable option as yet. However there is pull request #804 that addresses this problem.
Advanced: how to try out the updated TreeView now
If you feel brave and want to try out the updated version of TreeView before it is merged you can actually download it and add it to Atom, albeit not from Package Manager.:
Question: How to edit core files in Atom Editor.
It is required to clone the appropriate branch of the repository:
git clone -b single-click-select git#github.com:Alhadis/tree-view.git
Thanks to Arcesilas for spotting this answer.

Plone 'member folders' option dont work

I've enabled 'member folders' in plone administration panel. Then I've created a context menu link in the ZMI (with url: string:${portal/portal_membership/getHomeUrl}) to make these folders easy available.
I've noticed, that .getHomeUrl() always returns None, and link looks like: 127.0.0.1:80/web/None.
Do you have any idea what's wrong?
First of all, you normally enable that option in the Security tab of your Plone control panel:
If you set the option there, it'll also add a 'My Folder' action automatically that uses the .getHomeUrl() method.
.getHomeUrl() only returns a URL if the folder already exists. In your case it appears the folder is not yet created for the current member. The folder is first created when a member logs in but does not have their own folder yet. Logging out then in again should remedy this.
If you accidentally removed the Members folder from your Plone setup, you'll need to recreate it. Per-user folder creation would otherwise fail. If it is missing, simply create a new folder with the id Members in the root of your site.

Resources