Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telephone Extraction Button Doesn't Appear to Work #1

Closed
Bowiemb opened this issue Oct 27, 2017 · 4 comments
Closed

Telephone Extraction Button Doesn't Appear to Work #1

Bowiemb opened this issue Oct 27, 2017 · 4 comments

Comments

@Bowiemb
Copy link

Bowiemb commented Oct 27, 2017

Everything else seems to work just fine; however, when I select a country of origin and select "Extract Telephone Number", nothing happens.

Any advice?

Thank you!
My best,
Michael

@giTorto
Copy link
Owner

giTorto commented Oct 28, 2017

Hi,
It's hard to say without any further information.
It's a bit hard to me to debug it as of know, but I can tell you where you can find the error most likely.
If nothing seems to happen, I would guess the error is in the front end.
On the client side, the main difference is related to the selection of the country, in the function defined at

extract: function (services) {

The client side error should be easy to detect just showing the javascript console and seeing if there is an error when clicking on "Extract Telephone Number".

To test the server side, can you try with different origins, such as Italy, U.S., whatever?
The implementation of the Italian telephone numbers extraction is mostly based on a regex, whereas for other countries is mostly based on the telephone-number library by google.

On the server side, All features share the most part of the code.
The only main difference between extraction of Telephone numbers, urls and e-mails is in in the function call at

risultato = getNumbers(text);

The function is defined at

private Oggetto getNumbers(String text) {

Thank you for your help

My best,
Giuliano

@Bowiemb
Copy link
Author

Bowiemb commented Oct 30, 2017

Yes, sir. The Javascript console printed out the following error:

project-bundle.js:41604 Uncaught ReferenceError: getSelectedText is not defined
at Dialog.extract (project-bundle.js:41604)
at HTMLButtonElement. (project-bundle.js:41556)
at HTMLButtonElement.dispatch (project-bundle.js:4643)
at HTMLButtonElement.elemData.handle (project-bundle.js:4311)

@giTorto
Copy link
Owner

giTorto commented Oct 31, 2017

Interesting, I have just added the above mentioned function.
Can you try to build it again and let me know whether it solved the issue?

@Bowiemb
Copy link
Author

Bowiemb commented Oct 31, 2017

That fixed it! Thank you, sir.

My best,
Michael

@Bowiemb Bowiemb closed this as completed Oct 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants