View Issue Details

IDProjectCategoryView StatusLast Update
0020872mantisbtupgradepublic2017-07-09 05:02
Reporterjoediddley Assigned Toatrol  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version1.3.0-beta.3 
Summary0020872: Argument passed to columns_remove_invalid() must be an array, null given, called in...
Description

Apologies in advance if I am not following protocol, I'm just a normal user.
I have been trying to upgrade an existing installation of MantisBT 1.2.15, schema 183, to no avail.

I tried Rc1 and then nightly build, with same results. Here is what happens:

(A) Install.php writes two "Notice" implying twice-defined custom constants (though that is not the case in custom_constants_inc file), where we have these bug additional statuses <?php
define ( 'INPROGRESS', 60 );
define ( 'SUSPENDED', 70 );
?>

Maybe there is an "implicit" definition of them from some reference of those custom statues in another file such as bug flow? Since these were in 1.215 custom_constants_inc file they should be acceptable in 1.30, no? I'd be scared to remove these definitions as it isn't clear that would work either, and feels like it could break our mappings and statuses.

The install script only had those two messages on the page, and nothing else: There was no other button or any indication it had completed. I don't know if the install script failed after these warnings, or not. Do we have an ambiguous state, I don't know (but should).

(B) After (A) above, going to index / my_view_page, I received the crypto warning, which from reading sounded like it was fixed in latest builds, yet it has the same problem and message as the RC1 build. So I manually added $g_crypto_master_salt = '12345678901234567890'; in the config_inc file and that seems to have satisfied it. But then:

(C) Now going to my_view_page.php I get this system error message:

'Argument 1 passed to columns_remove_invalid() must be an array, null given, called in [...]/core/custom_function_api.php on line 299 and defined' in '[...]/core/columns_api.php' line 420

Overall, I want to upgrade because I want to be able to export our bug data keeping images and attachments which I understand only 1.3 does, not 1.2.

Does anyone want to take a look at this? I can provide you our SSH login info and you can look at our set-up if that would help.

I am on a time schedule whereby I am being forced to move our installation to another server, but I don't want to do that without our images in tact. Thank you.

TagsNo tags attached.

Relationships

related to 0023028 closedatrol 'Argument 1 passed to columns_remove_invalid() must be of the type array, null given, called in /var/www/html/mantislast/core/cu 

Activities

joediddley

joediddley

2016-05-03 13:33

reporter   ~0053059

Last edited: 2017-07-05 05:58

here are config_inc and custom_strings_inc file (copied from 1.2.15 unchanged).

custom_strings_inc:: <?php
$s_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:in progress,70:suspended,80:resolved,90:closed';

$s_in_progress_bug_button = "Issue In Progress";
$s_in_progress_bug_title = "Set Issue In Progress"; 
$s_email_notification_title_for_status_bug_in_progress = "The following issue is IN PROGRESS.";

$s_suspended_bug_button = "Issue Suspended";
$s_suspended_bug_title = "Set Issue to Suspended"; 
$s_email_notification_title_for_status_bug_suspended = "The following issue is SUSPENDED.";
?>

config_inc:
<?php
# Mantis - a php based bugtracking system

# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
# Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net

# Mantis is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# Mantis is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Mantis.  If not, see <http://www.gnu.org/licenses/>.

    # --------------------------------------------------------
    # $Id: config_inc.php.sample,v 1.19.2.2 2007-10-25 17:13:42 giallu Exp $
    # --------------------------------------------------------

    # This sample file contains the essential files that you MUST
    # configure to your specific settings.  You may override settings
    # from config_defaults_inc.php by assigning new values in this file

    # Rename this file to config_inc.php after configuration.

    ###########################################################################
    # CONFIGURATION VARIABLES
    ###########################################################################

    # In general the value OFF means the feature is disabled and ON means the
    # feature is enabled.  Any other cases will have an explanation.

    # Look in http://www.mantisbt.org/manual or config_defaults_inc.php for more
    # detailed comments.

    $g_crypto_master_salt = '12345678901234567890';

    # --- database variables ---------

    # set these values to match your setup

    $g_db_type       = "mysql";

    # --- email variables -------------
    $g_administrator_email  = 'admin@mile26.com';
    $g_webmaster_email      = 'webmaster@mile26.com';

    # the "From: " field in emails
    $g_from_email           = 'noreply@mile26.com';

    # the return address for bounced mail
    $g_return_path_email    = 'admin@mile26.com';

    # --- file upload settings --------
    # This is the master setting to disable *all* file uploading functionality
    #
    # The default value is ON but you must make sure file uploading is enabled
    #  in PHP as well.  You may need to add "file_uploads = TRUE" to your php.ini.
    $g_allow_file_upload    = ON;

    /**
     * Adding custom statuses 60 and 70
     * Overrides @global string $g_status_enum_string in config_defaults_inc.php
     */
    $g_status_enum_string               = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:in progress,70:suspended,80:resolved,90:closed';

    $g_status_colors['in progress'] = '#32cd32'; 
    $g_status_colors['suspended'] = '#e8e8e8'; 

    $g_status_enum_workflow = array (
      10 => '20:feedback,30:acknowledged,40:confirmed,50:assigned,60:in progress,70:suspended,80:resolved,90:closed',
      20 => '10:new,30:acknowledged,40:confirmed,50:assigned,60:in progress,70:suspended,80:resolved,90:closed',
      30 => '10:new,20:feedback,40:confirmed,50:assigned,60:in progress,70:suspended,80:resolved,90:closed',
      40 => '10:new,20:feedback,30:acknowledged,50:assigned,60:in progress,70:suspended,80:resolved,90:closed',
      50 => '10:new,20:feedback,30:acknowledged,40:confirmed,60:in progress,70:suspended,80:resolved,90:closed',
      60 => '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,70:suspended,80:resolved,90:closed',
      70 => '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:in progress,80:resolved,90:closed',
      80 => '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:in progress,70:suspended,90:closed',
      90 => '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:in progress,70:suspended,80:resolved'
    );

    $g_set_status_threshold = array (
      20 => 10,
      30 => 10,
      40 => 10,
      50 => 10,
      60 => 10,
      70 => 10,
      80 => 10,
      90 => 10,
    );

?>
joediddley

joediddley

2016-05-03 13:35

reporter   ~0053060

Ummm, finally, can you please block out my DB login info in the file pasted above. Thx :)

atrol

atrol

2016-05-04 17:47

developer   ~0053064

There have been similar issues, e.g. 0017605.
Are you able to reproduce the issue using 1.3.0-rc1 or a nightly build instead of 1.3.0-beta.3?

joediddley

joediddley

2016-05-04 18:07

reporter   ~0053067

My apologies.. I reported the version incorrectly. The above issue was reproduced with mantisbt-1.3.0-rc.2-dev-master-3709b44.tar.gz

atrol

atrol

2016-05-07 11:21

developer   ~0053090

joediddley,

does running admin/check/index.php give some warnings or errors?

The provided information is not sufficient to provide more help in resolving the issue. A complete and detailed description is required for the support team to get a clear understanding of the problem.

Provide detailed, step-by-step instructions to reproduce the issue; the additional information listed below may also be useful:

  • Exact version of PHP, Database, Web server, Browser and Operating System
  • Installed plugins or custom functions ?
  • Was the MantisBT source code modified in any way ?
joediddley

joediddley

2016-05-09 20:22

reporter   ~0053106

To reproduce:
(a) I have current version of MantisBT 1.2.15, schema 183 installed in Mantis directory our server.
(b) I copy and unpack mantisbt-1.3.0-rc.2-dev-master-3709b44 to another directory Mantis2 on same server in same parent directory as Mantis above in (a).
(c) I copy config_inc, custom_constants_inc and custom_strings_inc from Mantis to Mantis2/config
(d) I go to admin/install.php in Chrome browser (v 49.0.2623.112 ).
(e) The problems up at the top of this original bug report description occur, in the order of (A), (B), (C).

Running admin/check/index.php gives 1 warning and 1 fail:
PHP
FAIL: magic_quotes_gpc php.ini directive is disabled. PHP's magic quotes feature is deprecated in PHP 5.3.0 and should not be used.
WARN: display_errors php.ini directive is disabled. For security reasons this directive should be disabled on all production and Internet facing servers.

All other tests appear as PASS.

Exact version of PHP is 5.3.24.

SELECT Version() in MySql returns 5.0.96-log

The MantisBT source was not modified in any way. There are some custom variables I previously copied to this bug report.

I do not know of any other installed plugins or custom functions. The server is hosted/administered by godaddy for what that's worth. MantisBT 1.2.15 is working fine with the same set up.

atrol

atrol

2016-05-10 06:18

developer   ~0053107

Let's start with fixing problem (A)

I am wondering that your custom_constants_inc.php did work before
There is line
define ( 'SUSPENDED', 70 );
but there is also line
define( 'SUSPENDED', 80 );
in file core/constant_inc.php which explains that you get something like "Notice: Constant SUSPENDED already defined"

You do not use any of the constans in custom_constants_inc.php at the moment.
So the easiest way would be to remove the file.

Concerning (B)

So I manually added $g_crypto_master_salt = '12345678901234567890' ...
This is the right way to fix it, of course using a more random string than '12345678901234567890' would be better in terms of security

Concerning (C)
Tell me what you get after fixing (A) and after this step.

(d) I go to admin/install.php in Chrome browser (v 49.0.2623.112 ).
Keep in mind that you have to restore your database to 1.2.15 before running the install script.
This might not be needed if your first tries did not change the database until now.
You can check this by having a look at table mantis_config_table where config_id = "database_version".
Is the value 183?
If yes, it's still 1.2.15 and your previous tries did not change anything in database.

joediddley

joediddley

2016-05-10 12:48

reporter   ~0053115

It worked by removing the custom_constants_inc.php file (which, removed the duplicate define ( 'SUSPENDED', 70 );

Hence, these possible issues could use consideration as a result of this investigation:

(A) The install script stops cold after providing the message about having a duplicate constant define. But the message looks and sounds like a warning not a failure. The page shows no status as to whether the install completed or not, or what needs to be done next. Suggest some kind of status output is provided there or it is very confusing, may cause support overhead.

(B) I thought from bug 0014087 the upgrade would handle creating the salt automatically. But because of the install problem I had in (A) above, I cannot say whether or not the salt actually would have been created for me. (I manually created a salt before the upgrade was successfully run all the way through.) Looking at Bug 0014087 again, it refers to "installation" but not "upgrade". Since the salt requirement is new for 1.3 maybe it should be double-checked that the script will also set it up automatically during an upgrade too.

Thank you for the assistance.

atrol

atrol

2016-06-08 05:11

developer   ~0053282

joediddley,

This is not a bug or feature request for MantisBT (you asked for help on how to deal with problems during upgrade caused by your own wrong modifications). I am therefore resolving this issue as "no change required".

Please use the forums, the mantisbt-help mailing list or IRC to get support on customizing and using MantisBT (refer to http://www.mantisbt.org/support.php for links and further details).

the script will also set it up automatically during an upgrade too.
Not that easy as the file is in use during upgrade, might not be writable and might contain closing PHP tags (so it would be a bit more than just adding a new line at the end of the file)
Feel free to enter a new issue for this feature request.