Action buttons (+ menu) not working #56

Open
opened 2025-12-28 23:24:55 +01:00 by adam · 6 comments
Owner

Originally created by @bedge27 on GitHub (Aug 27, 2025).

I've finally got WYGIWYH up and running after some very amateur errors, and was excited to start using it but now have an issue that I don't think is caused by my incompetence.

The 'date' and 'date reference' field is missing whenever I try adding a quick transaction.

Image

I'm able to fill in other details and press 'add', however the transaction doesn't appear in any accounts/transaction overviews etc. This is a copy of the error from the logs:

[2025-08-27 18:58:41] - WARNING - root - Could not resolve form field 'date'.
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/django/forms/forms.py", line 183, in __getitem__
    field = self.fields[name]
            ~~~~~~~~~~~^^^^^^
KeyError: 'date'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/crispy_forms/utils.py", line 69, in render_field
    bound_field = form[field]
                  ~~~~^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/forms/forms.py", line 185, in __getitem__
    raise KeyError(
KeyError: "Key 'date' not found in 'QuickTransactionForm'. Choices are: account, amount, category, description, entities, is_paid, mute, name, notes, tags, type."
[2025-08-27 18:58:41] - WARNING - root - Could not resolve form field 'reference_date'.
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/django/forms/forms.py", line 183, in __getitem__
    field = self.fields[name]
            ~~~~~~~~~~~^^^^^^
KeyError: 'reference_date'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/crispy_forms/utils.py", line 69, in render_field
    bound_field = form[field]
                  ~~~~^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/forms/forms.py", line 185, in __getitem__
    raise KeyError(
KeyError: "Key 'reference_date' not found in 'QuickTransactionForm'. Choices are: account, amount, category, description, entities, is_paid, mute, name, notes, tags, type."

I've tried various different images, I also removed the volume and recreated the database with the same result. On the off chance it would work, I even tried accessing it on different operating systems (Ubuntu 22.04 and Windows 11) and browsers (Firefox and Chromium) which made no difference.

The curious thing is that I logged into the demo instance to see what adding a quick transaction should look like, and I encountered the same error there (no date/date ref field), and I'm sure I tried it before without any issues.

Originally created by @bedge27 on GitHub (Aug 27, 2025). I've finally got WYGIWYH up and running after some very amateur errors, and was excited to start using it but now have an issue that I don't think is caused by my incompetence. The 'date' and 'date reference' field is missing whenever I try adding a quick transaction. <img width="847" height="879" alt="Image" src="https://github.com/user-attachments/assets/7a92c298-059e-4df8-8119-b19d7957de7d" /> I'm able to fill in other details and press 'add', however the transaction doesn't appear in any accounts/transaction overviews etc. This is a copy of the error from the logs: ``` [2025-08-27 18:58:41] - WARNING - root - Could not resolve form field 'date'. Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/django/forms/forms.py", line 183, in __getitem__ field = self.fields[name] ~~~~~~~~~~~^^^^^^ KeyError: 'date' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/crispy_forms/utils.py", line 69, in render_field bound_field = form[field] ~~~~^^^^^^^ File "/usr/local/lib/python3.11/site-packages/django/forms/forms.py", line 185, in __getitem__ raise KeyError( KeyError: "Key 'date' not found in 'QuickTransactionForm'. Choices are: account, amount, category, description, entities, is_paid, mute, name, notes, tags, type." [2025-08-27 18:58:41] - WARNING - root - Could not resolve form field 'reference_date'. Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/django/forms/forms.py", line 183, in __getitem__ field = self.fields[name] ~~~~~~~~~~~^^^^^^ KeyError: 'reference_date' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/crispy_forms/utils.py", line 69, in render_field bound_field = form[field] ~~~~^^^^^^^ File "/usr/local/lib/python3.11/site-packages/django/forms/forms.py", line 185, in __getitem__ raise KeyError( KeyError: "Key 'reference_date' not found in 'QuickTransactionForm'. Choices are: account, amount, category, description, entities, is_paid, mute, name, notes, tags, type." ``` I've tried various different images, I also removed the volume and recreated the database with the same result. On the off chance it would work, I even tried accessing it on different operating systems (Ubuntu 22.04 and Windows 11) and browsers (Firefox and Chromium) which made no difference. The curious thing is that I logged into the demo instance to see what adding a quick transaction should look like, and I encountered the same error there (no date/date ref field), and I'm sure I tried it before without any issues.
adam added the questionhelp wanted labels 2025-12-28 23:24:55 +01:00
Author
Owner

@eitchtee commented on GitHub (Aug 27, 2025):

Hey, glad to hear you got it working. Anything you feel should be better documented?

A Quick Transaction is like a template for a transaction you have to add many times, so you don't have to type out the same information multiple time or duplicate a existing transaction.

For example, let's say you go twice a week to your favorite restaurant and order the same thing every time, instead of having to type out this information twice a week, you can add a template (a quick transaction) to quickly add this transaction every time you need it, as such, in order to be quick, the date and reference date are inferred from the current day. The page you access the form to add a quick transaction is just a management page for your existing templates, they won't get added to your transactions right away.

To actually add a new transaction or quick transaction click the yellow button on the bottom right of the page, it will display the options you have (this is available on most views, but not all of them):

Image

Let me know if this solves your problem.


Also, thanks for pointing out the error you're getting, a brainfart on my part, I will add a fix, but it isn't impacting anything right now.

@eitchtee commented on GitHub (Aug 27, 2025): Hey, glad to hear you got it working. Anything you feel should be better documented? A **Quick Transaction** is like a template for a transaction you have to add many times, so you don't have to type out the same information multiple time or duplicate a existing transaction. For example, let's say you go twice a week to your favorite restaurant and order the same thing every time, instead of having to type out this information twice a week, you can add a template (a quick transaction) to quickly add this transaction every time you need it, as such, in order to be quick, the date and reference date are inferred from the current day. The page you access the form to add a quick transaction is just a management page for your existing templates, they won't get added to your transactions right away. **To actually add a new transaction or quick transaction** click the yellow button on the bottom right of the page, it will display the options you have (this is available on most views, but not all of them): <img width="882" height="797" alt="Image" src="https://github.com/user-attachments/assets/63064111-2177-425a-a519-6fffe5b7d170" /> Let me know if this solves your problem. --- Also, thanks for pointing out the error you're getting, a brainfart on my part, I will add a fix, but it isn't impacting anything right now.
Author
Owner

@bedge27 commented on GitHub (Aug 27, 2025):

Thanks for the quick response. Nothing wrong with the documentation, just me not paying proper attention to it!

That completely makes sense about quick transactions and seems really quite obvious now, and actually a pretty handy feature. Unfortunately that brings me onto another issue that I probably should have mentioned in the first post - whenever I click on any of the options that appear, nothing happens, other than the options disappearing. I think this added to my confusion around quick transactions as it was the only screen that I could actually get to. I can't see anything relevant in the logs.

@bedge27 commented on GitHub (Aug 27, 2025): Thanks for the quick response. Nothing wrong with the documentation, just me not paying proper attention to it! That completely makes sense about quick transactions and seems really quite obvious now, and actually a pretty handy feature. Unfortunately that brings me onto another issue that I probably should have mentioned in the first post - whenever I click on any of the options that appear, nothing happens, other than the options disappearing. I think this added to my confusion around quick transactions as it was the only screen that I could actually get to. I can't see anything relevant in the logs.
Author
Owner

@eitchtee commented on GitHub (Aug 27, 2025):

Well, that's certainly odd.

Can you check some things for me, please:

  1. Do the buttons work on the demo site? What device and browser are you using?
  2. Do something show up on the docker logs when you click the buttons?
  3. Also, if you're on a computer, open the dev tools on your browser and check if there's any errors on the console tab and the network tab. (CTRL + SHIFT + I, then check the Console tab and the Network tab at the top)
@eitchtee commented on GitHub (Aug 27, 2025): Well, that's certainly odd. Can you check some things for me, please: 1. Do the buttons work on the demo site? What device and browser are you using? 2. Do something show up on the docker logs when you click the buttons? 3. Also, if you're on a computer, open the dev tools on your browser and check if there's any errors on the console tab and the network tab. (CTRL + SHIFT + I, then check the Console tab and the Network tab at the top)
Author
Owner

@bedge27 commented on GitHub (Aug 28, 2025):

  1. I've tried Chrome (version 139.0.7258.128), Firefox (142.0.1) and Edge (139.0.3405.119) on Windows 11 and Firefox on Ubuntu - none of these work. I've just tried it on my phone (Chrome 139.0.7258.143 on Android 15) and it works, I'm able to select every option from the 'yellow +' menu. The demo site has the issue on Windows and Ubuntu but also works okay on Android.
  2. Nothing shows in the logs
  3. The only error I get (only on Chrome and Windows) relates to a redirect being "blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource". I'm using Pangolin and that error seems to crop up on all my sites which are working okay, so I'm guessing it's unrelated.

I can create a transaction on my Android phone and then edit and save it successfully on Windows/Ubuntu if needed, so I can do this as a work around. I'm just happy I can start using WYGIWYH!

Let me know if there's anything else you want me to check/test.

@bedge27 commented on GitHub (Aug 28, 2025): 1. I've tried Chrome (version 139.0.7258.128), Firefox (142.0.1) and Edge (139.0.3405.119) on Windows 11 and Firefox on Ubuntu - none of these work. I've just tried it on my phone (Chrome 139.0.7258.143 on Android 15) and it works, I'm able to select every option from the 'yellow +' menu. The demo site has the issue on Windows and Ubuntu but also works okay on Android. 2. Nothing shows in the logs 3. The only error I get (only on Chrome and Windows) relates to a redirect being "blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource". I'm using Pangolin and that error seems to crop up on all my sites which are working okay, so I'm guessing it's unrelated. I can create a transaction on my Android phone and then edit and save it successfully on Windows/Ubuntu if needed, so I can do this as a work around. I'm just happy I can start using WYGIWYH! Let me know if there's anything else you want me to check/test.
Author
Owner

@eitchtee commented on GitHub (Aug 28, 2025):

Well.., no idea what's going on.

If the demo site also has problems, we can discard it being an issue with your server/instance, and more about something with your browsers or computer.

You being able to edit a transaction but not adding one is extra baffling, because it uses the exact same behavior as adding a transaction, just a different url.

A few ideas, but I'm truly baffled right now:

  1. One option would be a browser extension meddling about, but I doubt you have three browsers with the same configurations and extensions. Maybe you could try using an Incognito tab (or a browser profile with no extensions or custom configurations), to discard this possibility.
  2. If your instance is exposed to the internet, and you feel confortable doing so, you could create an user for me (any email and password will suffice, no need for admin access or sharing anything), you can reach me with details at hello[at]herculino.com (this probably will lead nowhere, but who knows)
  3. What do you get on your network tab at Dev Tool when you click one of the buttons and nothing happens? Below is an example screenshot of what you should get when clicking the Income button, the important part is if a call to an url (like /add) is being done and raising an error, or if it doesn't get called at all.
Image

Either way, hope you enjoy WYGIWYH, sorry for not being of much help, but I have no idea on what might be happening, hopefully we can get to the bottom of this.

@eitchtee commented on GitHub (Aug 28, 2025): Well.., no idea what's going on. If the demo site also has problems, we can discard it being an issue with your server/instance, and more about something with your browsers or computer. You being able to edit a transaction but not adding one is extra baffling, because it uses the exact same behavior as adding a transaction, just a different url. A few ideas, but I'm truly baffled right now: 1. One option would be a browser extension meddling about, but I doubt you have three browsers with the same configurations and extensions. Maybe you could try using an Incognito tab (or a browser profile with no extensions or custom configurations), to discard this possibility. 2. If your instance is exposed to the internet, and you feel confortable doing so, you could create an user for me (any email and password will suffice, no need for admin access or sharing anything), you can reach me with details at hello[at]herculino.com (this probably will lead nowhere, but who knows) 3. What do you get on your network tab at Dev Tool when you click one of the buttons and nothing happens? Below is an example screenshot of what you should get when clicking the Income button, the important part is if a call to an url (like /add) is being done and raising an error, or if it doesn't get called at all. <img width="1048" height="284" alt="Image" src="https://github.com/user-attachments/assets/05ac2b86-e79e-49cd-a426-6929a9f29ea6" /> Either way, hope you enjoy WYGIWYH, sorry for not being of much help, but I have no idea on what might be happening, hopefully we can get to the bottom of this.
Author
Owner

@samuelthng commented on GitHub (Sep 2, 2025):

@bedge27 - Maybe to see if it's pangolin, try if you can replicate the error when hitting the application from your local IP.

Eg.:
If your server is 192.168.0.5 and the application is running on :8080.
Then navigate to 192.168.0.5:8080 in your browser.

If CORS error still show up, it might be a reverse proxy config issue - likely some assets are not being proxied properly.


Also, if your SSL certificate is being handled by Pangolin and you're using https externally, then https should be true on your Django env options:
https://github.com/eitchtee/WYGIWYH/blob/main/.env.example#L8

Maybe a screenshot of the request that failed due to CORS might provide some insights.

@samuelthng commented on GitHub (Sep 2, 2025): @bedge27 - Maybe to see if it's pangolin, try if you can replicate the error when hitting the application from your local IP. Eg.: If your server is `192.168.0.5` and the application is running on `:8080`. Then navigate to `192.168.0.5:8080` in your browser. If CORS error still show up, it might be a reverse proxy config issue - likely some assets are not being proxied properly. --- Also, if your SSL certificate is being handled by Pangolin and you're using https externally, then https should be true on your Django env options: https://github.com/eitchtee/WYGIWYH/blob/main/.env.example#L8 Maybe a screenshot of the request that failed due to CORS might provide some insights.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WYGIWYH#56