Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Error when import a...
 
Notifications
Clear all

Error when import affectations

2 Posts
2 Users
0 Reactions
2,118 Views
Damien
(@dnaton)
Posts: 248
Active Member
Topic starter
 
[#3803]

Hello,

When I try to import affectation, I have a red error message on the screen

When I see the log, I have this message

2016-11-03 16:47:59.776 ===== TRACE ===== Importation : File type CSV
2016-11-03 16:47:59.777 ===== TRACE ===== File Name : ../files/attach/importexport_Affectation_20161103_163949.csv
2016-11-03 16:48:00.562 ** ERROR ** ERROR **
2016-11-03 16:48:00.563
** ERROR ** on file 'D:Xampphtdocsad_geodemodelAffectation.php' at line (272)
2016-11-03 16:48:00.564
** ERROR ***** cause = Array to string conversion

Can anyone maybe tell me what is the problem ?

My process to import was :

1) Export affectation in Excel shhet from a Projeqtor v5.5.4
2) Open this file to supress the ID (I tried with ID and the problem is the same)
3) Import in a new Projeqtor (V5.5.4 too)

The projects and ressources was created before on the destination Projeqtor (with export/importation from the other Projeqtor site) : with no problem and error during inportation


Regards,
Damien
-----------------------------------------------
.
ProjeQtOr v12.1.0 - Apache v2.4.56 - MariaDB v10.4.28 - PHP v8.2.4
Plugins installed : PersonalizedTranslation 1.6 - ScreenCustomization 7.2

 
Posted : 03 Nov 2016 18H58
(@babynus)
Posts: 14952
Member Admin
 

Hi,
Issue occurs because you did not export the "resource" field.
Export this field to avoir the error.

This leads to an error on the control that is never reached through the application, only through import.

To avoid the issue, replace in /model/Affectation.php, lines 270- from

    if (! $this->idResource) {
    	$result.='
' . htmlEncode(i18n('messageMandatory',array(i18n('colIdResource')) . ' ' . htmlEncode(i18n('colOrContact')) . ' ' . htmlEncode(i18n('colOrUser')))); }

to

    if (! $this->idResource) {
    	$result.='
' . htmlEncode(i18n('messageMandatory',array(i18n('colIdResource')))); }

Fix will be included in next version.


 
Posted : 03 Nov 2016 19H46
Share:

Scroll to Top