Disable minifier errors logging - liferay

There's lots of people looking for how to disable the minifiers in Liferay, but our problem is sightly different: how do we disable the minifiers dumping the contents of the files to the log? We don't really care if some file can't be minified, but when it happens, it writes the files again and again on each visit to the log, generating gigabyte-sized log files.

I had the same problem in a liferay 6.2 portal and the resolution is quite simple.
The log about minifier issues is generated by com.liferay.portal.util.MinifierUtil class with ERROR level.
Add an entry to specify for that class an upper lever like FATAL.

Related

Log4j Shared Log file Rolling file appender issue

I was asked to assist in debugging a peculiar issue, related to log4J.
They are facing issues with the rolling file appender. There are multiple EJB applications writing to the same log file. Each application has its own log4j.properties.
Issue: The latest log files are being written to a file trace.log.x instead of trace.log. Is there any setting which needs to be added? I could not really find an anomaly. Below are the settings.
log4j.rootLogger=INFO, A3
log4j.appender.A3=org.apache.log4j.RollingFileAppender
log4j.appender.A3=org.apache.log4j.RollingFileAppender
log4j.appender.A3.File=$variable/trace.log
log4j.appender.A3.MaxFileSize=10MB
log4j.appender.A3.MaxBackupIndex=5
I was wondering if I need to set the log4j at the server level instead of the app level. I don't like the idea though. I am not in favour of log file being shared. There is no log file corruption, but looks like the wrong file is getting updated

How to get velocity.log file using log4j.properties file. i don't want to involve velocity.properties file

Now my velocity.log and velocity.log.1 are at :installed software eclipse Kepler\eclipse-64\eclipse
i don't know how these files are created here.
By default, Velocity log files are created in the current working directory.
To change this behavior, you'll have to somehow configure Velocity. If you don't want to mess with velocity.properties, then you can configure Velocity using Java, as described in this documentation section which explains how to have Velocity log to an existing Log4j logger.

Security extension for Magento, scanning server for changes files

I use a plugin for WordPress called "WordFence". It works by scanning all files on the server and checking for changes or suspicious code.
I am looking for something similar to Magento. Does it exist?
To put it another way, I am looking for an extension to help with security, and scanning files looking for changes would help a lot.
You should use a version control system for that, as it does exactly what you describe (and more).
For example, git status will show you all modified files since last release. You could use .gitignore to exclude media files and other volatile stuff.
See Yireo's tutorial on git and Magento on how to get started.

Trouble syncing file-based templates to database using MSM and config bootstrap

Had started my typical EE build (using a bootstrapped config) for a client when they announced they wanted another additional site using the MSM module (le sigh).
So added the MSM module, I commented out the $config['site_url'] and $config['cp_url'] and set those in index.php instead using $assign_to_config.
That's when I discovered this bug where MSM config file settings are not recognized, which is a pain but I can work around it. However, I noticed that when I created the secondary site, it wouldn't recognise my custom location for add-ons and so I had to add that to index.php as well to $assign_to_config['third_party_path'] = "../assets/third_party/";.
Then I discovered that when I create or modify a template file, it won't automatically sync and so I need to manually do that each time which is a real PITA.
Why would my templates not be syncing to the database? Is this related to the MSM config bug?
While I haven't tried bootstrapping the third party path yet, I've definitely been able to bootstrap the template path for MSM sites... What bootstrap method are you using?
Are your sites on subdomains or subfolders? I've only had experience with subfolders so perhaps that makes a difference (although it shouldn't).
Could you maybe walk through in a bit more detail what's happening? Your first site (site_id = 1) templates sync automatically from filesystem edits, but your second site does not? Yet if you go to CP > Design > Synchronize Templates, that works?
The $assign_to_config portion of MSM setup is definitely a weakspot when it comes to bootstrapping... I wonder if we need to work up an additional bootstrap for MSM+CP environment, where it looks at the cp cookie ($_COOKIE['exp_cp_last_site_id']), and sets values based on that.
It may be helpful if you let us know which bootstrap you are using. For example, if you look at this bootstrap the site_url and cp_url are set using the HTTP_HOST server variable, so this shouldn't clash with your MSM install (and multiple domains) at all.
Perhaps you could try using that boostrap file instead, and see if it fixes your issue with template syncing?
Finally, if you're going to use the EE template manager, you don't really need to store templates as files. Conversely, if you want to save templates as files, it's probably much easier editing them using Sublime Text or another editor, rather than the clunky built-in editor (which is really only useful for small/simple changes).

How do I add a project to CruiseControl.NET?

I am looking at the cruisecontrol web dashboard. I can see one farm and one server. However, I don't see any way to add a project?
Is this something I can do with the UI or do I need to edit the config file by hand?
You'll need to edit the ccnet.config file by hand (located within the CruiseControl directory) to add projects. There are some graphical tools to help you do this however you do get used to doing it by hand fairly quickly - just have the documentation near by!
Update: An example of one such tool is http://www.codeplex.com/ccnetconfig
You can use CCNETConfig to edit the config file through an UI although it doesn't support higher version > CruiseControl.NET 1.4.
You have to basically edit the configuration file by hand, however I have it setup so that the raw config file is split into different include files, each of which is setup in my source control system. Then I created a project for the configuration, and then for the whole config. So when something changes in the config, CC.NET itself pulls out the changes, recreates it's config files and the refreshes the system configuration.
This means that anyone can edit the config (if they can access the files in sourcecontrol), and no-one has to go into the program files directory of the CC.NET machine itself.
Not sure whether this answers the question you asked, but this is how our setup works

Resources