Task #7725

Remove dead code from AtoM

Added by Mike Gale over 7 years ago. Updated almost 6 years ago.

Status:VerifiedStart date:12/17/2014
Priority:MediumDue date:
Assignee:Dan Gillean% Done:

0%

Category:Internals
Target version:Release 2.3.0
Google Code Legacy ID: Tested version:2.2
Sponsored:No Requires documentation:

Description

There is some dead code here: https://github.com/artefactual/atom/blob/qa/2.2.x/plugins/sfIsadPlugin/modules/sfIsadPlugin/templates/indexSuccess.php#L35
We should remove it. Jesús also mentioned there might be multiple places where the same code is disabled too.

History

#1 Updated by Dan Gillean over 7 years ago

See also:

  • /apps/qubit/modules/search/templates/_printAdvancedSearchTerms.php

And possibly:

  • /apps/qubit/modules/object/templates/alouetteSuccess.xml.php
  • /apps/qubit/modules/object/templates/marcSuccess.xml.php
  • /apps/qubit/modules/object/templates/metsSuccess.xml.php

Jesús has recently completed an audit of pretty much every template in AtoM. He might know of more areas worth investigating.

#2 Updated by Mike Gale over 7 years ago

  • Status changed from New to Feedback
  • Assignee changed from Mike Gale to Jesús García Crespo

Can we just remove the files Dan mentions? Are there files / areas of code we're missing Jesús?

#4 Updated by Jesús García Crespo over 6 years ago

  • Assignee deleted (Jesús García Crespo)

#5 Updated by Nick Wilkinson about 6 years ago

  • Category deleted (Quality assurance)
  • Status changed from Feedback to In progress
  • Assignee set to Jesús García Crespo
  • Priority changed from Low to Medium

Hi Jesus, this dropped off the radar a while ago, and since the 2.3 release is coming up soonish I'm putting this back on the schedule.

#6 Updated by Nick Wilkinson about 6 years ago

  • Assignee changed from Jesús García Crespo to José Raddaoui Marín

#7 Updated by José Raddaoui Marín about 6 years ago

  • Status changed from In progress to Code Review
  • Assignee changed from José Raddaoui Marín to Mike Gale

PR 299

Dan, '/apps/qubit/modules/search/templates/_printAdvancedSearchTerms.php' is a partial that isn't used anywhere and the others are used by '/apps/qubit/modules/object/actions/exportAction.class.php', but I could not find a link to that export in any place (neither a route for it), so I have removed that action too, and another file that is only used by that it ('apps/qubit/modules/object/config/export/marc.yml') and the 'apps/qubit/modules/object/config/export' folder.

Mike, the code in the component you link in update 3 is used to find and get the first ancestor with a creator, which is used in the related partial.

#8 Updated by Jesús García Crespo about 6 years ago

  • Status changed from Code Review to Feedback
  • Assignee changed from Mike Gale to José Raddaoui Marín

Radda, can you also take a look at https://github.com/artefactual/atom/tree/qa/2.3.x/plugins/sfDrupalPlugin/vendor/drupal and see how much of that do we really need? I think that we only need the stuff under misc/ which are web assets, but it'd be good to confirm.

#9 Updated by José Raddaoui Marín about 6 years ago

  • Status changed from Feedback to Code Review
  • Assignee changed from José Raddaoui Marín to Jesús García Crespo

Hi Sevein,

I could only find files used from '/plugins/sfDrupalPlugin/vendor/drupal/misc/' and '/plugins/sfDrupalPlugin/vendor/drupal/modules/user/user.js'. I've removed all except that, cleared symfony and browser cache and tested all I could find (autocompletes, dialogs, password strength widget, datepickers, etc.). Everything seems to be working fine

#10 Updated by Jesús García Crespo about 6 years ago

  • Status changed from Code Review to Feedback
  • Assignee changed from Jesús García Crespo to José Raddaoui Marín

That's amazing! You just got rid of 21,110 LOC (~2mb). Thank you, please merge!

#11 Updated by Jesús García Crespo about 6 years ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from José Raddaoui Marín to Dan Gillean

I've merged this for you, Radda.

#12 Updated by Dan Gillean almost 6 years ago

  • Category set to Internals
  • Status changed from QA/Review to Verified
  • Target version set to Release 2.3.0

Also available in: Atom PDF