Author Topic: Important Data Corruption Bug Affecting Some People with nBill 1.2.6  (Read 1710 times)

Offline netshine

  • Administrator
  • Hero Member
  • *****
  • Posts: 4,952
    • View Profile
The problem:

A bug has been identified in nBill 1.2.6 which may affect some people who have more than 500 client records. If you select an order record for a client whose name appears toward the end of the alphabet, it is possible that the client will not be loaded into the client list on the order editor. If you then save that order, it will default to the first client on the list. This could result in data corruption. Likewise, if you try to edit an invoice for a client who does not appear in the list, the invoice will be saved with 'Not Applicable' selected as the client (which is not so serious, as the invoice itself will still be valid without any data loss, just not accessible by the client).

This bug only affects you if:

1) You have more than 500 clients
2) You try to edit and save an order record for a client who is not among the first 500 listed.
3) The same problem may occur on other editors that load a list (ie. clients on the invoice list, or unpaid invoices on the income editor, although it is much less likely that there will be more than 500 unpaid invoices on the system, so this is unlikely to be a problem).

The workaround:

Amend your /administrator/components/com_netinvoice/common.functions.php file. Where it says:

$record_limit = 500;

(near the start of the file), change that 500 to a much higher number (eg. 10000) - at least as high as the number of clients you have. That way, all clients will be listed in the order editor, so the problem will not occur.

The fix:

I will release a fixed version as soon as possible (note, this was tested before release, and worked ok, so it is possibly only related to certain versions of MySQL or some other configuration issue).
« Last Edit: 24/February/2009, 12:59:26 PM by netshine »