I have lost control!

I have lost control!

by Steve Edwards -
Number of replies: 5

I am encountering some very odd problems with a moodle I have just put up. This is my third moodle in about a month and so I am generally familiar with the way the program behaves (generally very well).

The symptoms are that when I try to add a resource I get the normal dialogue boxes on the two screens to fill in but when I click on save I get a 'No action was specified' dialogue box.

I can now no longer delete items that I post either! Any ideas please?

Average of ratings: -
In reply to Steve Edwards

Re: I have lost control!

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Make sure that your $CFG->wwwroot is correct.  You can also try turning secureforms off.
In reply to Martin Dougiamas

Re: I have lost control!

by Steve Edwards -

In case this ever happens to some other poor soul I would like to share my experience regarding the error message:

'No action was specified' (see picture).

This was driving me nuts and although Martin pointed me in the right direction I did not actually understand (see) what he was pointing to until today.

In the config.php file there is a line that tells moodle where it is located:

// Now you need to tell Moodle where it is located. Specify the full web address to where moodle has been installed. If your web site is accessible via multiple URLs then choose the most natural one that your students would use. Do not include a trailing slash.

$CFG->wwwroot = 'http://www.thenameofthewebsite.com';

But clever me had missed out the 'www' and as a result all sorts of weird stuff happened... well basically everything worked but whenever you tried to save a resource, forum etc. I would get the 'No action was specified' message.

Anyway it cost me hours but I learned a lot in the process!

Attachment noaction.gif
Average of ratings:Useful (1)
In reply to Steve Edwards

Re: I have lost control!

by Tom Brown -

Thank you Steve! I was also missing the www. in config.php

Changing that seems to have fixed the same problem. Your helpful post is appreciated!
In reply to Steve Edwards

Re: I have lost control!

by Carson Anderson -
Worked great for me! A little bit of help for those who want the site accessible from multiple urls. What worked for me was to add some rewrite rules in apache that way someone can still go to link1.place.com and link2.place.com...etc. and apache will force them to permanentlink.place.com.

I already had some extra junk in there for https redirects but here is an example of a section out of my virtual_hosts.conf file:


<VirtualHost *:80>
RewriteEngine On
ReWriteCond %{HTTP_HOST} link1.place.com [OR]
ReWriteCond %{HTTP_HOST} link2.place.com [OR]
RewriteCond %{HTTPS} off [OR]
ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://permanentlink.place.com/$1 [NC,R,L]
</VirtualHost>


<VirtualHost *:443>
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
ReWriteCond %{HTTP_HOST} link1.place.com [OR]
ReWriteCond %{HTTP_HOST} link2.place.com
RewriteRule ^/(.*) https://permanentlink.place.com/$1 [NC,R,L]

DocumentRoot "/var/www/html"
SSLEngine on
SSLCertificateFile /path/to/cert
SSLCertificateKeyFile /path/to/key
</VirtualHost>


And here is the same thing if you're not forcing https:

<VirtualHost *:80>
RewriteEngine On
ReWriteCond %{HTTP_HOST} link1.place.com [OR]
ReWriteCond %{HTTP_HOST} link2.place.com
RewriteRule ^/(.*) http://permanentlink.place.com/$1 [NC,R,L]
</VirtualHost>