Status

addons.mozilla.org Graveyard
Add-on Builder
VERIFIED FIXED
7 years ago
4 years ago

People

(Reporter: zalun, Assigned: zalun)

Tracking

unspecified
Builder 0.9
x86
Linux

Details

(Whiteboard: [ftw])

(Assignee)

Description

7 years ago
Sometimes attachments loads an old version of itself - it should never happen.
Switching to old revision displays the latest saved attachment
(Assignee)

Comment 1

7 years ago
It is not an old version.
Attachments are not saving script blocks 

To reproduce (my test settings in brackets):
1. Create HTML attachment ('html/test.html')
2. Add script block (multiple lines) <script>any content</script>
3. Save
4. Reload the page
(Assignee)

Comment 2

7 years ago
The other problem is that when attachment is changed and new instance is created - its new id is not returned. There is no problem with the modules as we identify them by a path

:andym suggested to add a some id_number for the attachment. it will become unique for a following pair: 

* revision.pk, 
* attachment.id_number

One can reproduce the issue with doing following (create a new package as it will get broken)
1.  Add attachment (js/test/js)
2.  Change its content
3.  Save
4.  Open revisions modal and click on one revision back
5.  Change the attachment and save
6.  Navigate to the latest revision (hard reload)
7.  Observe 2 attachments with the same name
8.  Delete one of these attachments
9.  Reload
10. Observe the resurrection of the attachment
(Assignee)

Comment 3

7 years ago
Just wrote the test and it seems that the problem is actually in front-end.
https://github.com/mozilla/FlightDeck/commit/6aa71c6e2c16ad44467fea5fbf8230d8d160f196#L3R284
(Assignee)

Comment 4

7 years ago
above (comment 3) is related the comment 1
(Assignee)

Comment 6

7 years ago
Both issues are fixed 

Duplicate attachments:
https://github.com/mozilla/FlightDeck/commit/0cfe66d22007814330b12639977fbbcd9cd3eacc
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED

Comment 7

7 years ago
Verified. Works fine on https://builder-addons.allizom.org
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.