Forum

[SOLVED] Activities...
 
Notifications
Clear all

[SOLVED] Activities deleted

13 Posts
2 Users
0 Reactions
12.9 K Views
 DPo
(@dpo)
Posts: 11
Active Member
Topic starter
 
[#1802]

Hello,
A BIG issue I faced today :
While deleting a project with 9 activities attached, Projeqtor asked the confirmation to delete the 9 activities related (ok, normal behavior) but it deleted also the whole set of activities whatever the project except 1 activity (why this one in particular !?).
here below the structure of the project to delete

Done it twice to control (with a backup), each time the same results with the deletation.

Browser : Firefox 29.0.1
Version : ProjeQtOr V4.2.3, windows server with mysql


 
Posted : 12 May 2014 20H21
(@babynus)
Posts: 14952
Member Admin
 

Hi,

Sorry, I don't understand exactly the issue described :

it deleted also the whole set of activities whatever the project

Do you mean it deleted activities that sould not have been deleted ?
(it is not clear in the screenshots)

except 1 activity

Is it an activity that should have been deleted ?
Could you try to delete it manualy : do you get any message that could explain the behavior ?

Could you check log file for errors are report them here ?


 
Posted : 13 May 2014 12H35
 DPo
(@dpo)
Posts: 11
Active Member
Topic starter
 

Do you mean it deleted activities that sould not have been deleted ?
(it is not clear in the screenshots)

That's it,
expected : 9 activities linked to the project to be deleted
Issue : ALL the activites of the database deleted (more than 300), whatever the project, except 1 activity.

sorry for the screen shots, I wanted to show the original structure of the project / activities to be deleted.

Is it an activity that should have been deleted ?

No, the one activity remaining was out of the project deleted,
In both my tries, it was the same activity remaining, though the databases were not exacly the same (the backup had less records)

Could you check log file for errors are report them here ?

No error risen in the log file at both tries. only the trace of logging.

The first time, The screen "freezed" after the confirmation of deleting the project and activities. I closed ff and relaunched and discover the results of deletation (only 1 activity remaining)
after restoring the backup, I chose the same project to delete and after few seconds of work the screen show back the project list but the database contains only one activiy left, the same as the first time.


 
Posted : 13 May 2014 13H29
(@babynus)
Posts: 14952
Member Admin
 

Very Strange : I cannot reproduce 🙁

Do you have a structure of projects ?
(deleting project will delete sub-projects and activities of sub-projects).


 
Posted : 13 May 2014 13H52
(@babynus)
Posts: 14952
Member Admin
 

To help debug; could you try :

- go to the project you wish to delete.
- update parameters.php file to set $debugQuery=true;
- delete project
- retrieve log file and send it to support@projeqtor.org

Thanks.


 
Posted : 13 May 2014 13H54
 DPo
(@dpo)
Posts: 11
Active Member
Topic starter
 

Sorry,
In the file : projeqtorfilesconfigparameters.php

I added the line : "$debugQuery = true;" but nothing appeared in the log file when I delete the project,
:huh: I tried also "$debugQuery = 'true';" without success either.

Only the --TRACE-- are written in log file.


 
Posted : 13 May 2014 20H39
(@babynus)
Posts: 14952
Member Admin
 

My mistake : you must also define $logLevel="3";
to activate debug level.


 
Posted : 13 May 2014 22H13
 DPo
(@dpo)
Posts: 11
Active Member
Topic starter
 

Ok, it worked better 😉
log file sent.


 
Posted : 13 May 2014 23H00
(@babynus)
Posts: 14952
Member Admin
 

Hi,

Log helped to find a hint.

It seems the program tries to delete twice the same Activity.
I don't know how this can happen and could not reproduce.
But when trying to delete Activity already deleted, it comes to cascading delete activities with idActivity = null. Which leads to deletion of most activities.

The workaround is to update code in /model/persistence/SqlElement.php, add one line after line 895, so it looks this way :

	private function deleteSqlElement() {
		if (! $this->id or $this->id<0 ) {return;}
		$class = get_class($this);

Could you try it and confirm it fixes the issue ?


 
Posted : 14 May 2014 16H56
 DPo
(@dpo)
Posts: 11
Active Member
Topic starter
 

Modification done, it fixed the issue. (controled twice)

Thank you very much ! and Please continue with this great work ! 🙂


 
Posted : 14 May 2014 23H10
 DPo
(@dpo)
Posts: 11
Active Member
Topic starter
 

Hi babynus,
any chance to have it integrated the next release ?


 
Posted : 19 May 2014 23H13
(@babynus)
Posts: 14952
Member Admin
 

The fix will of course be integreted in next release.


 
Posted : 20 May 2014 0H47
(@babynus)
Posts: 14952
Member Admin
 

For information, it is Ticket #1381


 
Posted : 20 May 2014 0H49
Share:

Scroll to Top