Can't disable dev mode on Redux - wordpress

I've downloaded Redux from WP plugin repo. It tells me that the dev_mode is on and that I don't have the latest Redux build. I've turned off the dev_mode in sample-config and barebones-config and nothing changed.
It works, when I install the dev mode disabler plugin, but I don't want to have to ship it off to users together with the framework itself. I tried copying the code from the disabler plugin into my functions.php and no luck.
Any ideas?

Find this:
'dev_mode' => true,
inside your default setArguements() function
and change the parameter to true/false as you like.

Go to your configation page and make 'dev_mode' => false.
It will not exactly work if WP_DEBUG is True in your wp-config.php file.
If you want to disable the Developer Mood in Redux then first set the WP_DEBUG to false, then go to config.php ( whatever you name your configuration file ) and set 'dev_mode' => false.

Related

silverstripe fluent locale configuration

I need help to understand the documentation for Fluent, from here Fluent config documentation
The documentation says:
"You can create locales via the /admin/locales CMS section."
When I create a locale, for example english, and then click on it I get at popup saying "Not Found".
Do I need to install the locale somewhere else before using it?
Did you run dev/build?flush=1 when you installed the module? After installation you should have everything read to go, and can start adding locales in the CMS.
Note that when you add your first locale in the CMS, the existing pages you have will not be available in that locale and you'll need to go into the Pages section and publish the pages you want to show up in your default locale.
I ran into this aswell.
The problem were missing files in the resouces folder. The 'Not found.' message in the admin panel refers to missing static assets like js and css files from the resouces folder. Open up your dev tools and inspect the 404'd requests. There you can see which files exactly are missing.

Stop caching in Symfony

In my/app/cache, every time I edit a twig file I have to delete the 'prod' folder.
Is there a way to turn caching off?
Any help would be appreciated.
Although like stated use dev and if you really can't. Twig has a option for it. I have highlighted the line for you.
Quoted from http://symfony.com/doc/3.4/reference/configuration/twig.html#cache
cache
type: string default: '%kernel.cache_dir%/twig'
Before using the Twig templates to render some contents, they are compiled into regular PHP code. Compilation is a costly process, so the result is cached in the directory defined by this configuration option.
Set this option to null to disable Twig template compilation. However, this is not recommended; not even in the dev environment, because the auto_reload option ensures that cached templates which have changed get compiled again.
You can also leave in prod env, but set debug:true and this will force the templates to always recompile.

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.

How to disable secure pages on a local server?

I've just moved a Drupal to my localserver and I forgot to disable Secure Pages.
Now I cannot access admin pages, because the site switches to HTTPS.
How can I disable it?
In your settings.php file:
$conf['securepages_enable'] = FALSE;
This will override the database setting.
In your sites/example.com/settings.php, leave this line out, and then it will use whatever value is in the database.
If you are using drush, you can keep the Secure Pages module enabled and just turn off the checkbox in the module's own config like:
drush vset securepages_enable 0
This will stop the redirect.
you can also change the URLs if you want, as follows, but the above is usually enough.
drush vset securepages_basepath http://nominet.dev
drush vset securepages_basepath_ssl http://nominet.dev
I'm running Drupal 7 btw, so YMMV, but seems to be a simple drush based solution following on from the above answer.
The way I've done it without disabling the module is to use SQL to change the variable setting. First backup your database (in case you put a semicolon in the wrong place; scratch that, always back up your database before making changes on the command line) and then run the following SQL on your database:
UPDATE variable SET value = 's:1:"0";' WHERE name = 'securepages_enable';
Then:
DELETE FROM cache;
DELETE FROM cache_page;
You need those two lines in order to clear the cache, otherwise the variable might stick around for a while.
If you have Drush installed:
drush dis -y securepages
I know this question is old and has been answered a few times, but there's another option that hasn't been suggested yet.
You could disable it completely:
// Disable SecurePages completely.
$conf['securepages_enable'] = FALSE;
and alter settings.php to enforce HTTPS depending on some context, e.g.:
if (isset($_SERVER['environment'] && $_SERVER['environment'] == 'staging')) {
$conf['securepages_basepath'] = 'http://staging.example.com';
$conf['securepages_basepath_ssl'] = 'https://staging.example.com';
} else if (isset($_SERVER['environment'] && $_SERVER['environment'] == 'production')) {
$conf['securepages_basepath'] = 'http://www.example.com';
$conf['securepages_basepath_ssl'] = 'https://www.example.com';
} else {
// We're on dev or some other server instance where SSL isn't needed.
$conf['securepages_enable'] = FALSE;
}
This is just an example, but it's been a helpful way for us to manage sites that exist on a dev server, a QA server, and a production server, where we want to track settings.php changes in version control without having to change things in each environment.
You can disable the module directly via the database. Just go into the system table, look for your module under the name column, and set the status field to zero.

Silverstripe on souceforge project web

how do I install silverstripe on sourceforge for a project. I know I need a synlink...but I don't know how to?
I have a htdocs folder that is read only (once on the server) that I can access via sftp
it is accsesable via url
I have a persistent folder that is rightable (once on the server) that I can access via sftp
it is not accsesable via url
I have a mysql credentials that are accseped during install but can't be finished because of no right accsess
So you're trying to install SilverStripe on sourceforge? Well, okay.
I guess you need to check that the MySQL user you're using has write access to the database. Also, that you got the database name right in the installation process: if you didn't, the installer will try to create that database, and if you don't have the necessary permission (usually the case on shared hosting setups), you'll get an error complaining about the CREATE DATABASE statement.
So do I understand it right that your problem is that you can upload SilverStripe, but you can not install it, because the installer wants to write the config file?
Well, in this case there is actually a way to get SilverStripe running without using the installer. Just enter the database information into your mysite/_config.php file.
It should look something like this:
<?php
global $project;
$project = 'mysite';
global $databaseConfig;
$databaseConfig = array(
"type" => 'MySQLDatabase',
"server" => 'localhost',
"username" => 'myuser',
"password" => 'mypass',
"database" => 'mydatabasename',
"path" => '',
);
MySQLDatabase::set_connection_charset('utf8');
// This line set's the current theme. More themes can be
// downloaded from http://www.silverstripe.org/themes/
SSViewer::set_theme('blackcandy');
// Set the site locale
i18n::set_locale('en_US');
// enable nested URLs for this site (e.g. page/sub-page/)
SiteTree::enable_nested_urls();
Director::set_environment_type('dev');
// Director::set_environment_type('live');
please note that SilverStripe by default requires write permission on the assets/ folder, not only for uploading files, it also requires it for saving CSS files if the environment type is set to live, because SilverStripe wants to fetch all JS and CSS files, combine them into 1 single JS and 1 CSS file and saves them into the assets/ folder.
If this is not possible, the admin will simply not load, you can also work around this by letting SilverStripe generate those files on another server (your local dev server) and then upload the files.

Resources