Mantis

[Resolved] Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins

Posted by Falkayn 
[Resolved] Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
January 08, 2009 05:08AM
We followed these steps when upgrading:

Mantis Upgrade

1. Backup MySQL database up
2. Backup files
3. Download 1.1.6 and extract files
4. Login to mantis go to plugins > plugin Manager > scroll to the bottom choose ‘Upgrade Mantis’
5. Copy files from 1.1.6 and paste over current version files replacing them
6. Go to mantisURL/admin/upgrade.php
7. Provide user and password to modify database and run (ran with no errors)
8. Log back into mantis and go to plugins > click on ‘upgrade’ next to each installed plugin

For some reason the SQL queries we are using for our Notes custom fields just stopped working at this point. It did however clear up some other problems we have been having with v1.1.4 so we would like to upgrade!

Mantis: 1.1.4
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Windows Server 2003



Edited 1 time(s). Last edit at 01/08/2009 05:09AM by Falkayn.
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
January 08, 2009 08:33AM
Can you take a look in the core/custom_fields_api.php file and post here the name of the functions starting by pm_old_* (under Linux, just do grep "pm_old_" core/custom_fields_api.php and post the result here).

Vincent


Mantis: 1.1.0, 1.1.5, 1.1.1
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux

Please complete your signature with your environment informations.
Enable skype notification here
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
January 09, 2009 12:07AM
Here are our results:

custom_field_api.php 543 function pm_old_custom_field_destroy( $p_field_id ) {
custom_field_api.php 598 function pm_old_custom_field_delete_all_values( $p_bug_id ) {
custom_field_api.php 808 function pm_old_custom_field_get_value( $p_field_id, $p_bug_id ) {
custom_field_api.php 868 function pm_old_custom_field_get_all_linked_fields( $p_bug_id ) {
custom_field_api.php 1006 function pm_old_custom_field_distinct_values( $p_field_id, $p_project_id = ALL_PROJECTS ) {
custom_field_api.php 1111 function pm_old_custom_field_set_value( $p_field_id, $p_bug_id, $p_value ) {
custom_field_api.php 1229 function pm_old_print_custom_field_input( $p_field_def, $p_bug_id = null ) {
custom_field_api.php 1341 function pm_old_print_custom_field_value( $p_def, $p_field_id, $p_bug_id ) {

Thanks for the fast response!

Mantis: 1.1.4
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Windows Server 2003



Edited 1 time(s). Last edit at 01/09/2009 12:07AM by Falkayn.
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
January 09, 2009 08:31AM
The issue is not what I thought. What is the error message? What happens exactly?

Vincent


Mantis: 1.1.0, 1.1.5, 1.1.1
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux

Please complete your signature with your environment informations.
Enable skype notification here
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
January 12, 2009 12:45AM
Some additional information:

On the upgraded system we found:
When we look at custom fields that use SQL queries, they show the query text and not the actual results, e.g. @sql.name.project instead of a list of project names. The extra long-text fields do not show at all, although the correct labels are shown.

After rolling back the upgrade:
We found that LongCF did not appear to work with long text fields, although they show and SQL queries were working. We get the following error when trying to save long custom fields:
Quote
Mantis error
APPLICATION ERROR #401
Database query failed. Error received from database was #1406: Data too long for column 'value' at row 1 for the query: UPDATE mantis_custom_field_string_table
SET value='Please use this format for each feature:\r\n\r\nAs a site admin I want to not have to guess all the noise keywords users might use so that we avoid scaring users with error messages.\r\n\r\nAs a user I want to be able to search for terms using common words so that I can find the pages that use those terms, without getting an error.'
WHERE field_id='15' AND
bug_id='11715'

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

Mantis: 1.1.4
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Windows Server 2003
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
January 12, 2009 11:04AM
Create a test.php file in your Mantis root directory with the following content:
Language: PHP
( &<a href="http://bugtracker.morinie.fr/mantis/view.php?id=039" target="_blank">#039</a>;core.php&<a href="http://bugtracker.morinie.fr/mantis/view.php?id=039" target="_blank">#039</a>; );     plugins_pluginmanager_function_repair_overwrite();  

Browse the file a lot of times (at least 10 times) with your favorite internet browser.

Vincent


Mantis: 1.1.0, 1.1.5, 1.1.1
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux

Please complete your signature with your environment informations.
Enable skype notification here
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
January 13, 2009 03:11AM
That appears to have fixed the problem!

Is that something we should do when upgrading to v1.1.6 then?

Mantis: 1.1.4
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Windows Server 2003
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
January 13, 2009 08:45AM
Yes, the action is already computed during the upgrade but for unknown reasons it does not work very well...

Vincent


Mantis: 1.1.0, 1.1.5, 1.1.1
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux

Please complete your signature with your environment informations.
Enable skype notification here
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
January 14, 2009 01:17AM
Vincent,

Sorry to trouble you, but we appear to still have problems after the upgrade.

LongCF
We get the following error when trying to save large numbers of characters in a custom field:
Quote

APPLICATION ERROR #401
Database query failed. Error received from database was #1406: Data too long for column &#039;value&#039; at row 1 for the query: INSERT INTO mantis_custom_field_string_table
( field_id, bug_id, value )
VALUES
( &#039;15&#039;, &#039;11757&#039;, &#039;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\&#039;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\r\nWhy do we use it?It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using \&#039;Content here, content here\&#039;, making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for \&#039;lorem ipsum\&#039; will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).\r\n \r\nWhere does it come from?Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of \"de Finibus Bonorum et Malorum\" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, \"Lorem ipsum dolor sit amet..\", comes from a line in section 1.10.32.\r\n\r\n&#039; ).

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

Mantis: 1.1.4
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Windows Server 2003
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
January 14, 2009 09:12AM
Send me your custom_fields_api.php file and print the content of the mantis_plugins_pm_function_overwrite_table.

Vincent


Mantis: 1.1.0, 1.1.5, 1.1.1
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux

Please complete your signature with your environment informations.
Enable skype notification here
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
January 16, 2009 07:08AM
I have sent you an email with those details.

Thanks!

Mantis: 1.1.4
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Windows Server 2003
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
January 28, 2009 04:11AM
Vincent,

Can you please let me know how you are going with getting time to look at this issue? We have annoyed users asking us when it might be fixed.

Thanks,
Angus

Mantis: 1.1.4
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Windows Server 2003
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
January 28, 2009 10:31AM
Does the mantis_plugins_longcf_custom_field_string_table table contains the entry?

Vincent


Mantis: 1.1.0, 1.1.5, 1.1.1
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux

Please complete your signature with your environment informations.
Enable skype notification here
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
January 28, 2009 11:29PM
Vincent,

Yes, I think it does. Does that help?

Regards,
Angus

Mantis: 1.1.4
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Windows Server 2003
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
January 29, 2009 08:34AM
Please, be sure.

Vincent


Mantis: 1.1.0, 1.1.5, 1.1.1
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux

Please complete your signature with your environment informations.
Enable skype notification here
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
February 02, 2009 07:04AM
I am sorry to have taken so long to reply, but I managed to get you more information.

1. Yes that table does get the data.

2. The problem only occurs in IE.

Thanks,
Angus

Mantis: 1.1.4
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Windows Server 2003
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
March 03, 2009 04:26AM
Hi Vincent,

Can you please let me know if there is anything else you can do with this issue?

Thanks,
Angus

Mantis: 1.1.4
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Windows Server 2003
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
March 19, 2009 07:17AM
Can you try the following patch

Vincent


Mantis: 1.1.0, 1.1.5, 1.1.1
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux

Please complete your signature with your environment informations.
Enable skype notification here
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
March 19, 2009 08:26AM
Vincent,

Thanks, I tried that patch, and the Report Issues no longer has a problem with long issues. However I now get the following error on the View Issues page:

Fatal error: Call to undefined function plugins_autoassign_log_event() in F:\Websites\MantisOld\plugins\longcf\core\custom_field_api.php on line 478

The error appears in a column that holds a custom field with an integer value.

EDIT: I tried again and found it failed in a different column (but still a custom one), this one does a lookup using SQL on project names (it gets the same error).

EDIT2: CSV export also gives that error on the 2nd record. If I have a view without custom columns then it works fine, however the detail page also throws an error at that point.

Angus

Mantis: 1.1.4
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Windows Server 2003



Edited 2 time(s). Last edit at 03/19/2009 08:34AM by Falkayn.
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
March 19, 2009 08:46AM
Just define it somewhere (in your config file by example)
Language: PHP
plugins_autoassign_log_event() {   }

Vincent


Mantis: 1.1.0, 1.1.5, 1.1.1
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux

Please complete your signature with your environment informations.
Enable skype notification here
Re: Upgrade from 1.1.4 to 1.1.6 breaks CFNotes and LongCF plugins
March 20, 2009 01:39AM
Thanks Vincent, I added that to custom_functions_inc.php and it works fine now. I will let you know how we go with re-testing the other issues.

Mantis: 1.1.4
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Windows Server 2003
Sorry, only registered users may post in this forum.

Click here to login



Online Users

Guests: 12
Record Number of Users: 1 on April 02, 2023
Record Number of Guests: 115 on November 09, 2023
Top Users
Hébergeur : Morinie.Fr