I have a drupal Module, and in the .info file I have
configure = admin/config/services/bright
But if I mouse over the "configure" link in the admin console, it says just
admin/config/services
In my .module I have the following:
function bright_menu() {
$items = array();
$items['admin/config/services/bright'] = array(
'title' => 'Bright',
'description' => 'Configuration for Bright module',
'page callback' => 'drupal_get_form',
'page arguments' => array('bright_form'),
'access arguments' => array('access administration pages'),
'type' => MENU_NORMAL_ITEM,
);
return $items;
}
No matter what I change the configure setting to, it strips the last word off.
This is Drupal 7.
Note the overlay module is on, so the actual URL it generates is:
http://my-url/users/my-user-name#overlay=admin/config/services
My last comment this all worked in a vanilla install of Drupal 7, but now that I've taken it to my customer's build, with a lot more stuff enabled, it stopped working.
Things I've tried:
clear/rebuilding the cache
rebuilding the menus
disabling and re-enabling the module.
completely disabling the module, deleting it, and re-installing from a zip file
I was able to solve the problem with some help.
On the site itself, in the Drupal log:
/admin/reports/dblog
There were lots of errors like this:
PDOException: SQLSTATE[HY000] [2002] Operation timed out in backup_migrate_source_db->_get_db_connection() (line 220 of /Library/WebServer/Documents/..../sites/all/modules/backup_migrate/includes/sources.db.inc).
Seems there was a second datasource configured in the settings.php / and this module
https://www.drupal.org/project/backup_migrate
Wants to access the database to create the menu.
Removed it, and everything works fine. Thanks!
Related
I had a module called as View Slideshow installed from the website -
https://www.drupal.org/project/views_slideshow
which had two modules automatically installed-
Views slideshow module and Views Slideshow: Cycle module.
Then, I uninstalled only one module for some reason --> Views Slideshow:Cycle. And View Slideshow module has not been uninstalled. Now i want to use both. But View Slideshow : Cycle module doesn't come as a separate installation. How to deal with such an issue ?
Neither View Slideshow is getting uninstalled , nor View Slideshow: Cycle as a separate module is getting installed. I am stuck up.
I solved it . I went to the path sites/siteurl/modules/views_slideshow and deleted the folder. I did it through filezilla as the drupal portal is uploaded on the server.
I changed the permalinks on my Wordpress site and now it's saying "Permalink structure updated. Remove write access on web.config file now!" which I need to do because the website isn't working now it goes to 404 page
Server: windows
Go to "Setting" => "Permalink" and change the "Common Setting" to the "Custom Structure"
It will fix the problem
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.
I am trying to get a Drupal to run a custom hooks; one that needs to run when a module is being installed and another for when the module is being unistalled. Is there a hook or a trigger that I can use to have Drupal run the hook while the module is installing or uninstalling? The hook that I need to run builds taxonomy terms from an array. I am basing the lay out on the hook_schema. An example of the implementation of this hook is:
function mymodule_install_taxonomy() {
return array(
<<Taxonomy Structure Here>>
);
}
This code would be placed in the .install file.
When your own module is installed or for others?
For your own, there is hook_install() (only called the first time your module is installed, usually used to install the schema defined in hook_schema() in Drupal 6, this is automated in Drupal 7), hook_uninstall(), hook_enable() (called every time your module is enabled) and finally hook_disable() (when your module is disabled).
Drupal 7 has also added a similar set of hooks that is however called when other modules are installed, uninstalled, enabled or disabled, see hook_modules_*()
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.