Difference between revisions of "Troubleshooting 1.x"

From SubjectsPlus
Jump to: navigation, search
(I can't get pretty URLs (a.k.a., mod_rewrite) working!)
 
Line 103: Line 103:
 
== I can't get pretty URLs (a.k.a., mod_rewrite) working!==
 
== I can't get pretty URLs (a.k.a., mod_rewrite) working!==
  
Bummer.  If you can get pretty URLs for the subject pages, i.e., www.yourcollege.edu/sp/subjects/history, but it's not working for the staff list, i.e., when you click on a user's staff_details page it just redirects you to staff.php, it's possible that you have a conflicting apache directive that pops a default file extension on extension-less files.  William S. provides this solution:
+
Have you uncommented the file (subjects/.htaccess)?  Remove those # marks or else it will do nothing.
 +
 
 +
Still not working?  Bummer.  If you can get pretty URLs for the subject pages, i.e., www.yourcollege.edu/sp/subjects/history, but it's not working for the staff list, i.e., when you click on a user's staff_details page it just redirects you to staff.php, it's possible that you have a conflicting apache directive that pops a default file extension on extension-less files.  William S. provides this solution:
  
 
"In the .htaccess file in the subjects folder, add the following line
 
"In the .htaccess file in the subjects folder, add the following line

Latest revision as of 13:15, 10 May 2011

NOTE: These are the 0.9 troubleshooting tips. Many of them are still relevant for 1.0, but this content needs to be checked and potentially updated.

Contents

[edit] I can't log in!

There are a few possible problems:

  • Your username and password don't exist/match. Have you tried the default "someone@yourcollege.edu" with "donuts"? Did you change the password? If you are stumped you can reset the password, see below.
  • The log in requires cookies. Do you have cookies enabled? More specifically, it uses session cookies. You might also want to try clearing your session cookies. If you use Firefox's web developer toolbar, you can clear session cookies under the cookies tab.
  • If you have installed SubjectsPlus in a different folder than expected, you might need to edit the paths at the top of control/includes/header.php:
include($_SERVER["DOCUMENT_ROOT"] . "/sp/control/includes/config.php"); 
include($_SERVER["DOCUMENT_ROOT"] . "/sp/control/includes/functions.php"); 

Try making this match where these files actually live on your server.

[edit] I can log in, but the page looks awfully vanilla!

  • You aren't seeing the CSS file, which suggests that $BaseURL (config.php) is not correct.

== I can log in, but I get an "Cannot regenerate session id" error

  • Maybe when you unzipped the file the config.php file had some extra whitespace added to the beginning or end? Try deleting that.

[edit] I see the admin pages, but they're peppered with Notice: Undefined variables

  • If you set your PHP error reporting to ignore notices, these will go away. Either change this on the server, or add the following line to the top of control/includes/config.php :

// Report all errors except E_NOTICE
error_reporting(E_ALL ^ E_NOTICE);

If that doesn't show errors, check out the PHP manual page on error reporting, or you could do worse that look at this page:

http://www.kalexandr.com/fight-empty-pages-or-enable-error-reporting-and-debug

[edit] I can see the public site, but the control panel just shows a blank page/throws an error

  • Check the include path at the top of control/includes/header.php--does this match the path where you have installed SubjectsPlus?
  • Is error reporting turned on? A blank page often means a PHP Fatal Error (that isn't being displayed, because the server has error reporting turned off).

[edit] I get this error: Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: user

Yikes. Try the solution here: http://www.phplivesupport.com/documentation/viewarticle.php?uid=1&aid=97&pid=3

[edit] I'm trying to use the FCKEditor, but it doesn't work!

  • If you get a 404 error where the text editing box should be, try fixing your $FCKPath in config.php

[edit] The RSS feed is not working!

There are a few possible issues:

  • Does your server allow url_fopen? Is it set to "on"? It needs to be. Both types of feed reader need to be able to open remote files (the xml feed)
  • Are you using PGFeed (i.e., is $pgparser set to 1)? If so, you need to be using PHP 5 on your server. NOTE: Version 0.9 ONLY uses PGFeed as of Nov 2 09.
  • PHP's XMLReader needs to be enabled on your server for PGFeed to work.
  • If you wish to see error messages from PGFeed, go to control/includes/feeder.php and show error messages in $rss->setOptions(1,3,0,86400) -- i.e., turn that third 0 to 1.

[edit] Resetting Passwords, the hard way

The easy way is to just go to the admin tab, and click the little key icon next to the user you want to modify.

You can't look up a password in the staff table, because they are hashed, so go into your PHPMyAdmin or the command line, and run the following query:

update staff set password = md5('new_password') where email = 'your_email'

You could also do the WHERE by lname or staff_id or anything you like. Note that 'your_email' should be replaced with . . . your email. If you're fixing the default user, it would be someone@yourcollege.edu

[edit] I get slashes in front of my apostrophes! E.g., don\'t instead of don't!

Magic quote woes! I've tried to fix this, but if you see this, note the page where it's occurring and contact the SubjectsPlus cabal. Or try to fix it yourself. Here's a page from the PHP manual: [ see http://us.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc Magic Quotes]

[edit] There is nothing under the TalkBack tab--it says "Sorry, there were no results. Try again."

  • TalkBack items are entered through the form on the subjects/talkback.php page. Once an item has been added, it will appear on the TalkBack tab of the admin.

[edit] Boy, I wish there was some sort of debugger!

Some files have a $debugger variable near the top; if you set this to "yes" it will show you some of the queries where there are sometimes problems. You can run these in PHPMyAdmin or wherever to see what's happening under the hood. I find it helpful. Running the debugger on control/login.php can be helpful, but it will mess up the session variable, so you might be logged in without knowing it (i.e., being redirected to the control/index.php page).

[edit] When I click on a subject guide from subjects/index.php, I get a 404!

If you have set $mod_rewrite to 1 in config.php, but your server doesn't support mod_rewrite, this might happen. Try setting $mod_rewrite to 0 and see if it works.

Pierre N adds:

"On my server, the module mod_rewrite was enabled. Still the pretty URL wasn't working. Something with the .htaccess file has to be enabled in the configuration file of the web server (httpd.conf). In the document root section of this file, you have to change (mine was set to None) the AllowOverride to All (this control which directives may be placed in .htaccess file). Once enabled, the pretty URL work charmingly."

[edit] How do I associate pictures with a Librarian?

If you go to the admin tab in the Control Panel, and click on the little camera icon next to a user, there are instructions on how to name and place images for display in the sidebar. Someday there will be an image uploader off that link (or else off the "Care to tell me more about yourself" link on the main page of the admin).

[edit] I can't get pretty URLs (a.k.a., mod_rewrite) working!

Have you uncommented the file (subjects/.htaccess)? Remove those # marks or else it will do nothing.

Still not working? Bummer. If you can get pretty URLs for the subject pages, i.e., www.yourcollege.edu/sp/subjects/history, but it's not working for the staff list, i.e., when you click on a user's staff_details page it just redirects you to staff.php, it's possible that you have a conflicting apache directive that pops a default file extension on extension-less files. William S. provides this solution:

"In the .htaccess file in the subjects folder, add the following line to the top of the file.

Options -MultiViews

Save and upload the file. This took care of the problem for me of having the default user information being displayed whenever anyone [clicks] on any of the users on the staff listing page. "

[edit] The images I upload through FCKeditor are in the wrong place!

You can set where the images will be uploaded in fckeditor/filemanager/connectors/php/config.php:

// Path to user files relative to the document root.

$Config['UserFilesPath'] = '/sp/assets/fckuserfiles/' ;

If you're not using the default directory structure, you need to set this up--or else an "sp/assets/fckuserfiles/" set of folders will be set up just for these images! Which, as I've discovered, is a bummer.

[edit] I'm trying to add a new user in the admin, and I get errors!

When a new user is added, SubjectsPlus also tries to create a folder for that user in assets/users/ and then copy in the default headshot.jpg (a silhouette). However, the users folder (and possibly the entire assets folder) needs to have permission for apache to write to it.

[edit] When I do a search in the Records tab, I get a MySQL error!

Eek. This may be because the search query doesn't like your table type for the default query. Go to records/index.php and around line 35 uncomment the different query ($q) and comment out the previous one. If this works now, go to subjects/search.php and do a similar thing with the commented out SQL around line 58.

[edit] When I look at the public splash page (subjects/index.php) the dropdowns are empty!

You need to have guides with these types for them not to be empty. Add a Subject (or Course or Topic) through the Admin interface, and presto! it should appear there. Don't want these content types to show? See the FAQs for Admins.

[edit] When I click on a link in a guide, the portlet (pluslet) collapses! Or, the link disappears!

One (or more) versions of SubjectsPlus (before 0.9.1.1) had a bug in subjects/guide.php. Open the file and delete the following code from the JavaScript portion (around line 135):


$('#main-body a, #sidebar a').livequery('click', function(event) {

$('#all-results').hide();

$('#find-results').fadeIn();

// alert ("you clicked " + $(this).text() + " " + $(this).attr("href"));

$(this).parent().parent().fadeOut();

return false;

});

[edit] I can't drag and drop pluslets in the Guides tab!!!

If you are running IIS as your web server, and your version is less than 0.9.4, you might need to rename the file

  jquery-ui-1.7.1.core+interactions.min.js

to

  jquery-ui-1.7.1.core_interactions.min.js

and make the change in control/includes/functions.php. IIS didn't like that + in at least one instance . . .

[edit] All my line breaks disappear from the description field of a Record!

Go to control/guides/guide_functions.php and comment out the line after "// eliminate final line breaks" (line 607 as I write this).

Personal tools
Namespaces

Variants
Actions
More
Toolbox