[GH-ISSUE #318] 🐛 [Minor] Console prints error #276

Closed
opened 2026-02-25 21:34:37 +03:00 by kerem · 11 comments
Owner

Originally created by @ulfgebhardt on GitHub (Feb 10, 2019).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/318

Originally assigned to: @jasonmunro on GitHub.

🐛 Bugreport

[Minor] Console prints error

This is prob. caused by the switch to cash.js (?)

image

Version & Environment

Rev: 2f9f16b66004e197a001eee46d80653c7449505b

OS: [Chrome beta]

Note: Using InLineView

Originally created by @ulfgebhardt on GitHub (Feb 10, 2019). Original GitHub issue: https://github.com/cypht-org/cypht/issues/318 Originally assigned to: @jasonmunro on GitHub. ## 🐛 Bugreport <!-- Describe your issue in detail. Include screenshots if needed. Give us as much information as possible. --> ### [Minor] Console prints error This is prob. caused by the switch to cash.js (?) ![image](https://user-images.githubusercontent.com/1238238/52537626-16de6380-2d69-11e9-821f-b71c0077cd2d.png) ### Version & Environment <!-- Paste Git-Commit ID or Tag-Name here --> Rev: [2f9f16b66004e197a001eee46d80653c7449505b](https://github.com/jasonmunro/cypht/commit/2f9f16b66004e197a001eee46d80653c7449505b) <!-- Specify your OS and OS Version here if the issue is (most likely) platform dependent. --> OS: [Chrome beta] Note: Using InLineView
kerem 2026-02-25 21:34:37 +03:00
  • closed this issue
  • added the
    bug
    core
    labels
Author
Owner

@jasonmunro commented on GitHub (Feb 10, 2019):

I can't seem to reproduce. Can you tell me on what page or during what action this happens? I need to reproduce it in debug mode so I can capture the trace leading up to the error. Thanks!

<!-- gh-comment-id:462159888 --> @jasonmunro commented on GitHub (Feb 10, 2019): I can't seem to reproduce. Can you tell me on what page or during what action this happens? I need to reproduce it in debug mode so I can capture the trace leading up to the error. Thanks!
Author
Owner

@ulfgebhardt commented on GitHub (Feb 10, 2019):

Directly after login - on the "Everything" Page; On "Contacts", on "History" ... so basically everywhere.
-> Maybe its a timing issue?

<!-- gh-comment-id:462162992 --> @ulfgebhardt commented on GitHub (Feb 10, 2019): Directly after login - on the "Everything" Page; On "Contacts", on "History" ... so basically everywhere. -> Maybe its a timing issue?
Author
Owner

@ulfgebhardt commented on GitHub (Feb 10, 2019):

image

image

<!-- gh-comment-id:462163107 --> @ulfgebhardt commented on GitHub (Feb 10, 2019): ![image](https://user-images.githubusercontent.com/1238238/52538328-b1db3b80-2d71-11e9-8398-21256146d376.png) ![image](https://user-images.githubusercontent.com/1238238/52538410-8a38a300-2d72-11e9-87f1-0bc5ea201ac3.png)
Author
Owner

@jasonmunro commented on GitHub (Feb 10, 2019):

I see the problem, AND I see that I disabled keyboard shortcuts while working on cash.js and forgot to enable it! Either way this code is dodgy and I don't like it. We were jumping through hoops to load JS specific references in the body of the page that are defined in a JS include in the page, then on DOM load trying to force that data into being "real" JS hoping the include is present in time which is just daft.

I have a solution which fixes all this by embedding real JS in the page with keywords instead of actual JS functions we need to call. In the JS include we just translate the keywords into the function name and all this goes away. Running tests now and should have a fix committed shortly.

<!-- gh-comment-id:462167433 --> @jasonmunro commented on GitHub (Feb 10, 2019): I see the problem, AND I see that I disabled keyboard shortcuts while working on cash.js and forgot to enable it! Either way this code is dodgy and I don't like it. We were jumping through hoops to load JS specific references in the body of the page that are defined in a JS include in the page, then on DOM load trying to force that data into being "real" JS hoping the include is present in time which is just daft. I have a solution which fixes all this by embedding real JS in the page with keywords instead of actual JS functions we need to call. In the JS include we just translate the keywords into the function name and all this goes away. Running tests now and should have a fix committed shortly.
Author
Owner

@jasonmunro commented on GitHub (Feb 10, 2019):

Should be fixed :)

<!-- gh-comment-id:462168279 --> @jasonmunro commented on GitHub (Feb 10, 2019): Should be fixed :)
Author
Owner

@ulfgebhardt commented on GitHub (Feb 11, 2019):

<3

<!-- gh-comment-id:462487182 --> @ulfgebhardt commented on GitHub (Feb 11, 2019): <3
Author
Owner

@jasonmunro commented on GitHub (Feb 12, 2019):

FYI I added some selenium tests around keyboard shortcuts after this fix and found out we have some cross browser issues because the default META control key is not as compatible across systems as I thought. Still working out how I want to fix that but I'm leaning toward just changing the defaults :).

<!-- gh-comment-id:462580863 --> @jasonmunro commented on GitHub (Feb 12, 2019): FYI I added some selenium tests around keyboard shortcuts after this fix and found out we have some cross browser issues because the default META control key is not as compatible across systems as I thought. Still working out how I want to fix that but I'm leaning toward just changing the defaults :).
Author
Owner

@ulfgebhardt commented on GitHub (Feb 12, 2019):

I actually did not know there are Keyboard shortcuts ;-)
Where can I read the list of keys?

Also I have to thank you for taking my request, I did a while back, seriously about tests. I think it has contributed alot to current stability of cypht - would you say writing the test is while your worth - have they caught errors regularly for you?

<!-- gh-comment-id:462713153 --> @ulfgebhardt commented on GitHub (Feb 12, 2019): I actually did not know there are Keyboard shortcuts ;-) Where can I read the list of keys? Also I have to thank you for taking my request, I did a while back, seriously about tests. I think it has contributed alot to current stability of cypht - would you say writing the test is while your worth - have they caught errors regularly for you?
Author
Owner

@jasonmunro commented on GitHub (Feb 12, 2019):

If you enable the keyboard shortcuts module set you will find a "shortcuts" link in the Settings section that shows you the keys and actions, and lets you set your own for each action.

The UI tests have been great. It took some work getting the initial flow going but now it's easy to add a new suite of tests. The tests are actually in python because 1. I know python and 2. it has good selenium bindings to make controlling the browser easy. With Travis and browserstack in the mix, we can (and do) test against IE/Edge/FF/Chrome/Safari.

Unit tests are great, but just because a block of code behaves the way you expect does not mean the app as a whole does :). Not to mention unit tests only exercise server side code while the UI tests include the client side bits. One of the best tests we have is sending ourselves an E-mail then navigating to the unread page and opening it. The test code itself for that is simple, but bootstrapping Travis properly was a lot of work.

<!-- gh-comment-id:462876287 --> @jasonmunro commented on GitHub (Feb 12, 2019): If you enable the keyboard shortcuts module set you will find a "shortcuts" link in the Settings section that shows you the keys and actions, and lets you set your own for each action. The UI tests have been great. It took some work getting the initial flow going but now it's easy to add a new suite of tests. The tests are actually in python because 1. I know python and 2. it has good selenium bindings to make controlling the browser easy. With Travis and browserstack in the mix, we can (and do) test against IE/Edge/FF/Chrome/Safari. Unit tests are great, but just because a block of code behaves the way you expect does not mean the app as a whole does :). Not to mention unit tests only exercise server side code while the UI tests include the client side bits. One of the best tests we have is sending ourselves an E-mail then navigating to the unread page and opening it. The test code itself for that is simple, but bootstrapping Travis properly was a lot of work.
Author
Owner

@ulfgebhardt commented on GitHub (Feb 12, 2019):

Haha yes, I know Travis is a pain - especially since you can only test after commit & push - but in my experience its quite powerful once properly set up.

<!-- gh-comment-id:462903454 --> @ulfgebhardt commented on GitHub (Feb 12, 2019): Haha yes, I know Travis is a pain - especially since you can only test after commit & push - but in my experience its quite powerful once properly set up.
Author
Owner

@jasonmunro commented on GitHub (Feb 12, 2019):

Travis is a pain but absolutely worth it. I try to minimize breakage before pushing with this: https://github.com/jasonmunro/cypht/blob/master/scripts/commit_check.sh It runs sanity checks on all the PHP, JS, and CSS files, and it runs all our unit tests and UI tests.

<!-- gh-comment-id:462908865 --> @jasonmunro commented on GitHub (Feb 12, 2019): Travis is a pain but absolutely worth it. I try to minimize breakage before pushing with this: https://github.com/jasonmunro/cypht/blob/master/scripts/commit_check.sh It runs sanity checks on all the PHP, JS, and CSS files, and it runs all our unit tests and UI tests.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#276
No description provided.