Error changing module settings after upgrading from 20050501 to 20050625

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
6/27/2005 6:49:33 PM
Gravatar
Total Posts 148

Re: Error changing module settings after upgrading from 20050501 to 20050625

I just upgraded from 20050501to 20050625.? I ran the 2 db upgrade scripts, and ran the CreateStoredProcedures script.? My site is mostly working, but when I try to edit the module settings (for at least my blog and HTML content modules), I get:
Server error in '/' application
File '/Admin/Error.htm' not found.
Description: Error processing request.
Error Message: HTTP 404. File '/Admin/Error.htm' not found.

And the following get added to Data/mojoportal-log.txt:

2005-06-27 23:23:41,710 [1089657776] ERROR mojoPortal.Web.Global [(null)] - www.brettle.com
Npgsql.NpgsqlException:
query-specified return row and actual function return row do not match
Severity: ERROR
Code: 42804
in <0x00056> Npgsql.NpgsqlConnector:CheckErrors ()
in <0x0001c> Npgsql.NpgsqlConnector:CheckErrorsAndNotifications ()
in <0x0005e> Npgsql.NpgsqlCommand:ExecuteCommand ()
in <0x0003e> Npgsql.NpgsqlCommand:ExecuteReader (CommandBehavior cb)
in (wrapper remoting-invoke-with-check) Npgsql.NpgsqlCommand:ExecuteReader (System.Data.CommandBehavior)
in <0x00096> mojoPortal.Data.NpgsqlHelper:ExecuteReader (Npgsql.NpgsqlConnection connection, Npgsql.NpgsqlTransaction transaction, CommandType commandType, System.String commandText, Npgsql.NpgsqlParameter[] commandParameters, NpgsqlConnectionOwnership connectionOwnership)
2005-06-27 23:23:41,926 [1094712240] ERROR mojoPortal.Web.Global [(null)] - www.brettle.com
System.Web.HttpException: File '/Admin/Error.htm' not found.
in <0x00357> System.Web.StaticFileHandler:ProcessRequest (System.Web.HttpContext context)
in <0x00233> System.Web.HttpApplication+ExecuteHandlerState:Execute ()
in <0x0007c> System.Web.HttpApplication+StateMachine:ExecuteState (IStateHandler state, System.Boolean readysync)
2005-06-27 23:23:42,339 [1089657776] ERROR mojoPortal.Web.Global [(null)] - www.brettle.com
System.Web.HttpException: File '/favicon.ico' not found.
in <0x00357> System.Web.StaticFileHandler:ProcessRequest (System.Web.HttpContext context)
in <0x00233> System.Web.HttpApplication+ExecuteHandlerState:Execute ()
in <0x0007c> System.Web.HttpApplication+StateMachine:ExecuteState (IStateHandler state, System.Boolean readysync)

Any ideas?

--Dean

6/27/2005 9:33:05 PM
Gravatar
Total Posts 148

Re: Error changing module settings after upgrading from 20050501 to 20050625

The problem is caused by a bug in PostgreSQL associated with dropped columns and functions which return records.  That was causing mp_modules_selectone() to fail.

The workaround seems to be to either never drop columns or to always use a special type to return records.  Below is the patch for mp_modules_selectone().

Cheers,

--Dean

--- 3mojoPortal.PostgreSQL.CreateStoredProcedures.sql.orig      2005-06-28 01:54:05.886516064 -0500
+++ 3mojoPortal.PostgreSQL.CreateStoredProcedures.sql   2005-06-28 02:20:28.515919824 -0500
@@ -3019,12 +3019,41 @@
        int --:pageid $1
 ) to public;

+select drop_type('mp_modules_selectone_type');
+CREATE TYPE public.mp_modules_selectone_type AS (
+               moduleid int4 ,
+               pageid int4 ,
+               moduledefid int4 ,
+               moduleorder int4 ,
+               panename varchar(50) ,
+               moduletitle varchar(255) ,
+               authorizededitroles text,
+               cachetime int4 ,
+               showtitle bool ,
+               edituserid int4
+);
+
+drop function mp_modules_selectone
+(
+       int --:moduleid $1
+) returns setof mp_modules;
+
 create or replace function mp_modules_selectone
 (
        int --:moduleid $1
-) returns setof mp_modules
+) returns setof mp_modules_selectone_type
 as '
-select *
+select
+         moduleid ,
+         pageid ,
+         moduledefid ,
+         moduleorder ,
+         panename ,
+         moduletitle ,
+         authorizededitroles ,
+         cachetime ,
+         showtitle ,
+         edituserid

 from
                mp_modules

You must sign in to post in the forums. This thread is closed to new posts.