Adding Currencies with null Value crashes interface

Any critical bugs will be fixed within 24-48 hours.
Post Reply
Badger
Posts: 38
Joined: 02 Nov 2020, 09:50
Name: John Ownby-Hibner
Location: Medford, USA
Company Name: Bear and Badger Club LLC
Contact:

Adding Currencies with null Value crashes interface

Post by Badger »

Hi,
Today I was adding some currencies to test out the currency tool in the Extension. I added one but didn't enter a 'Value'. The GUI refreshed and went blank.

I was able to go into the SQL database and delete that currency from the currency table. The GUI then came back.
User avatar
support
Site Admin
Posts: 6231
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Adding Currencies with null Value crashes interface

Post by support »

Can't reproduce it. I need more details how to reproduce it. Probably there are some errors in error log?
Badger
Posts: 38
Joined: 02 Nov 2020, 09:50
Name: John Ownby-Hibner
Location: Medford, USA
Company Name: Bear and Badger Club LLC
Contact:

Re: Adding Currencies with null Value crashes interface

Post by Badger »

I think it was a PICNIC error: I moved the Rukovoditel tab to a monitor that was vertical, document style, and the side menu 'disappeared' I realized later that the menu moves to the top of the page.

PICNIC error: Problem In Chair Not In Computer
Badger
Posts: 38
Joined: 02 Nov 2020, 09:50
Name: John Ownby-Hibner
Location: Medford, USA
Company Name: Bear and Badger Club LLC
Contact:

Re: Adding Currencies with null Value crashes interface

Post by Badger »

I thought it was my error but I was working with currencies again today. I entered one and didn't put a value in, the screen 'blanked' and I had to go into the table and delete the value.


When I added the currency without an initial value, the 'screen' went blank in this picture. No menus.

Image


Here's the offending currency, I was adding the Australian dollar and hit 'save' before putting in the value for it.

Image
User avatar
support
Site Admin
Posts: 6231
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Adding Currencies with null Value crashes interface

Post by support »

check php error log might there will be some error there.
Badger
Posts: 38
Joined: 02 Nov 2020, 09:50
Name: John Ownby-Hibner
Location: Medford, USA
Company Name: Bear and Badger Club LLC
Contact:

Re: Adding Currencies with null Value crashes interface

Post by Badger »

The Log folder within the Rukovoditel file structure is empty. Should I be looking somewhere else?
User avatar
support
Site Admin
Posts: 6231
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Adding Currencies with null Value crashes interface

Post by support »

Ask your hosting support where php log is stored.
Badger
Posts: 38
Joined: 02 Nov 2020, 09:50
Name: John Ownby-Hibner
Location: Medford, USA
Company Name: Bear and Badger Club LLC
Contact:

Re: Adding Currencies with null Value crashes interface

Post by Badger »

I was able to finally dig up the log and then dig through it.

Here is what I found:
[30-Aug-2021 09:56:49 America/Los_Angeles] PHP Warning: Undefined array key "location" in /home/adminbearbadger/public_html/crm/plugins/ext/modules/currencies/actions/currencies.php on line 63
[30-Aug-2021 10:00:07 America/Los_Angeles] PHP Fatal error: Uncaught DivisionByZeroError: Division by zero in /home/adminbearbadger/public_html/crm/plugins/ext/classes/currencies.php:112
Stack trace:
#0 /home/adminbearbadger/public_html/crm/plugins/ext/classes/currencies.php(129): currencies::get_exchange_rate()
#1 /home/adminbearbadger/public_html/crm/template/header.php(31): currencies::exchange_rate_widget()
#2 /home/adminbearbadger/public_html/crm/template/layout.php(115): require('/home/adminbear...')
#3 /home/adminbearbadger/public_html/crm/index.php(32): require('/home/adminbear...')
#4 {main}
thrown in /home/adminbearbadger/public_html/crm/plugins/ext/classes/currencies.php on line 112


Looks like a good ol' division by zero error is happening if the initial value is zero.
User avatar
support
Site Admin
Posts: 6231
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Adding Currencies with null Value crashes interface

Post by support »

Found issue. File from archive replace to plugins\ext\classes\
Let me know if it works ok now.
Attachments
currencies.zip
(1.77 KiB) Downloaded 80 times
Post Reply