Patch in #4 fix issue with dates. But creates an issue with Invoice View.

Steps to reproduce issue.
1. Apply patch in #4 to 1.33 (http://drupal.org/node/817322#comment-3053184)
2. Add invoice at (/storm/invoices)
3. Edit above invoice 3 times. For example change the invoice number or the description field.
4. View invoice at (/storm/invoices) Multiple copies of same invoice are display in Invoice View. Find attached screenshot to clarify.
5. Expected result is to display only one copy of the same invoice. The most up-to-date one.

Comments

tchurch’s picture

Status: Active » Postponed (maintainer needs more info)

I tried this and couldn't reproduce it.
Can you provide any more info?

Also the screenshot isn't attached.

francewhoa’s picture

StatusFileSize
new38.98 KB

Re-attaching screenshot.

Thanks tchurch for trying to reproduce :) I'll try to reproduce again from my end. Then post results here.

tchurch’s picture

This looks familiar. I think I had this before I applied the patch.

I'm don't think it's displaying duplicate records but instead it's the invoice number that hasn't been calculated correctly (again, this is because of the request date calculation).

I think you'll find that the two entries point to two different node_id's.
Can you confirm this?

With the patch applied (and old invoice dates/numbers fixed or deleted) then the request date and invoice number should be OK.

Let me know.

francewhoa’s picture

I think you'll find that the two entries point to two different node_id's.
Can you confirm this?

Thanks for your reply. Nope. All the invoices you see in screeshoot from #2 point to the same node_id. For a total of 4 invoices display in the view. But all 4 links point to the same node_id. In other words there is only one invoice. Every time I edit the invoice a new view is added to the view list.

Also this bug wasn't present before I applied the patch. But appear after I applied the patch. I'm referring to this patch http://drupal.org/node/817322#comment-3053184

Full module 1.33 with patch already applied http://drupal.org/node/817322#comment-3214760

francewhoa’s picture

I tested this issue on a fresh Drupal 6.16 install with Storm 1.33 and was not able to reproduce.

Issue was detected on a production site. After applying following patch to 1.33 http://drupal.org/node/817322#comment-3214760

I'll do another test with a fresh install then post my result here.

francewhoa’s picture

Note to self: The following removed some of the duplicates display in Invoice View at /storm/invoices
1. Go to admin/settings/performance
2. Deactivate all Drupal core caches
3. Save settings
4. Go again to admin/settings/performance
5. Click on 'Clear cached data'

francewhoa’s picture

Status: Postponed (maintainer needs more info) » Active
StatusFileSize
new6.68 KB
new6.8 KB

I can confirm that applying the following patch to 1.33 create this issue. I'm referring to this patch http://drupal.org/node/817322#comment-3053184

The following attached file creates the issue. This is the file after applying patch: storminvoice.module(after-patch).tar_.gz

The following attached file doesn't create issue. This is the file before applying the patch: storminvoice.module(before-patch).tar_.gz

I'm not a coder so I can't tell which line(s) into the file are the source of the issue. But storminvoice.module(after-patch).tar_.gz is definitely link to this issue.

francewhoa’s picture

StatusFileSize
new38.98 KB
new212.56 KB

I found another source of the issue. That one was hard to find. Very deep. I had to put on a scuba diving suit and bring a few extra bottles of air with me ;)

New steps the reproduce issue. Note that step 3 is the most important step.
1. One of the two following

*Apply following patch to Storm 6.x-1.33 http://drupal.org/node/817322#comment-3053184)
or
*Use Storm dev 6.x-1.x-dev July 11, 2010 as is.

2. Go to admin/content/node-type/storminvoice
3. Expand Workflow settings. Check Create new revision box.
2. Go to /storm/invoices Add an invoice.
3. Edit above invoice 3 times. For example change the invoice number or the description field.
4. Go to /storm/invoices to view the list of invoices. Multiple copies of same invoice are display. Notice that they all link to the same node_id/URL. This is the issue. Find attached screenshot to clarify issue location.
5. Expected result is to display only one copy of the same invoice. The most up-to-date one not all the invoice 'revisions'.

Reproduced with:
*Drupal 6.16 Fresh install
*Storm 6.x-1.33 / Storm dev 6.x-1.x-dev July 11, 2010 / Storm 6.x-1.33 with Patch

Note to self: Attaching Storm dev 6.x-1.x-dev July 11, 2010

tchurch’s picture

Now I see something. I still don't see the original problem with the patch but I do see that turning on the revision causes a problem with the view.
I've tested this too in both 1.33 and dev (11-july).

I've compared the before and after files too and can only see the differences from the patch.
The patch only removed the code added accidently added.

We should look at fixing the revision problem with this issue (in the dev version) but I still don't see a problem caused by the patch.

francewhoa’s picture

Version: 6.x-1.33 » 6.x-1.x-dev

Thanks tchurch :)

We should look at fixing the revision problem with this issue (in the dev version)

Ok. Changing version to 6.x-1.x-dev then.

I would be happy to contribute testing for a new patch. Any volunteers for a patch?

juliangb’s picture

This probably means that nid and vid are being confused somewhere. It should be a small change to correct it.

See previous issues (a while ago) which also had trouble with revisions.

It should be a small patch to fix (touch wood).

francewhoa’s picture

Thanks juliangb

See previous issues (a while ago) which also had trouble with revisions.

#340954: Use of revisions breaks timetrackings
#327219: Storm + workflow - duplicate nodes listed
juliangb’s picture

Status: Active » Needs review
StatusFileSize
new1.79 KB

Needs testing.

juliangb’s picture

Testing this...

Without the patch, invoices can appear multiple times in the list, confirming the bug. The patch doesn't seem to help though... which is odd because it looks to be the right correction to me. Will keep digging.

juliangb’s picture

Status: Needs review » Reviewed & tested by the community

I didn't apply the patch properly before. It works for me now. RTBC from me, but Francewhoa, can you confirm too?

tchurch’s picture

I managed to test this too and it looks like the invoice lists now remove the duplicates.

juliangb’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the review. Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

francewhoa’s picture

I didn't apply the patch properly before. It works for me now. RTBC from me, but Francewhoa, can you confirm too?

Sure. Confirming issue is fixed in latest Storm version. No more duplicates. Thanks all :)