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

urls in search results are not clickable links #11

Open
timo11 opened this issue Jun 20, 2018 · 16 comments
Open

urls in search results are not clickable links #11

timo11 opened this issue Jun 20, 2018 · 16 comments

Comments

@timo11
Copy link
Contributor

timo11 commented Jun 20, 2018

It is necessary to open a detail view and copy and paste urls into new browser tabs to view the referenced data.

@timo11
Copy link
Contributor Author

timo11 commented Jun 20, 2018

If 'linkify' is true for a field definition (in resources/config/fldmodel.json) then urls contained in that field will be displayed as hrefs in grids and forms. Referenced pages will open in new browser tabs.

@benanhalt
Copy link
Contributor

Just as an aside, in Chrome at least if you select a URL and right-click there is an option to "Go to http://whatever.it.is" even if it is not a link.

@timo11
Copy link
Contributor Author

timo11 commented Jun 20, 2018

But urls can't be selected in table displays of results.

@benanhalt
Copy link
Contributor

Not that it matters since you added this, but if you can't select them, then how could you copy and paste them?

@timo11 timo11 added the fixed label Aug 1, 2018
@timo11 timo11 added this to the Version 2.0 milestone Sep 13, 2019
@timo11
Copy link
Contributor Author

timo11 commented Sep 13, 2019

The first installment of this feature has been on the master branch and 'released' since 2018/6/20

@timo11
Copy link
Contributor Author

timo11 commented Sep 13, 2019

Not that it matters since you added this, but if you can't select them, then how could you copy and paste them?

You have to open a detail view.

@maxpatiiuk
Copy link
Member

make them be clickable by default

timo11 added a commit that referenced this issue Mar 18, 2020
@timo11 timo11 added the fixed label Mar 18, 2020
@maxpatiiuk
Copy link
Member

Does not seem to work
Links are not clickable regardless of the linkify defaultvalue
On the detail view every field's data is inside an input, yet it is not supposed to be editable, which does not makes sense #44. That may be the cause of this issue
Am I supposed to change anything else for links to begin working?

I did git pull so my local wp must be up to date

Screen Shot 2020-03-23 at 1 49 22 PM
Screen Shot 2020-03-23 at 1 49 35 PM
Screen Shot 2020-03-23 at 1 49 53 PM
Screen Shot 2020-03-23 at 1 50 10 PM

@timo11
Copy link
Contributor Author

timo11 commented Mar 23, 2020

Does it work if you set linkify to true in app/resources/config/fldmodel.json?

@maxpatiiuk
Copy link
Member

It was not set for any of the fields
I added it at the end like this:
Screen Shot 2020-03-23 at 2 18 57 PM
and then did everything according to README.md starting from step 4

Still does not seem to work:
Screen Shot 2020-03-23 at 2 20 35 PM

@timo11
Copy link
Contributor Author

timo11 commented Mar 23, 2020

Default is not working, but it works for me when I set linkify in fldmodel.json
linkified

@timo11
Copy link
Contributor Author

timo11 commented Mar 23, 2020

Linkify should be true by default for web portals exported as of commit 52c088b to specify6 repo for specify6/issues/688

@maxpatiiuk
Copy link
Member

I will reinstall WP on a clean Ubuntu install and will change the config file before running the make command. Hopefully, that will make links work

Also, is there a case when the user would want links to be not clickable? Performance difference?

@maxpatiiuk
Copy link
Member

It works!

Partially
webportal-installer/PortalApp/resources/config/fldmodel.json file does not seem to affect links
Also, PortalApp/app/model/FieldDefModel.js does not seem to affect links

flds.json file works well
Though, I initially added the "linkify":"true" for every line and that resulted in Loading... when searching for data. I waited for 10 sec and canceled loading
Screen Shot 2020-03-24 at 1 15 37 PM

Just saying that making that option be on for every column is very decremental for performance. I would suppose that it runs regex on every row in that case. It would be wise to firsty check if the string contains http and only after that run regex on it

(I had 165641 record on 3313 pages with about 30 cols

Making links be enabled only for one col in flds.json worked well and performance
was not bad
Screen Shot 2020-03-24 at 1 47 46 PM

@timo11
Copy link
Contributor Author

timo11 commented Mar 24, 2020

the file that needs to be edited is fldmodel.json in resources/config either in build/html/[core]/ or build/cores/[core]/webapp, depending which folder is installed to the http server. After installation changes to a portal's settings need to be made to the fieldmodel.json file in the installed portal app.

All fields in fieldmodel.json (and flds.json) have linkify set to true as of 3/23.

Filtering for http would eliminate links formed w/o http like ku.edu, xyz.org, www.frdc.co.uk etc.

I think we should automatically enable linkify for weblinks when the build web link pref is on, and make it false otherwise.

@timo11
Copy link
Contributor Author

timo11 commented Mar 24, 2020

Seems that blindly setting linkify to true for all fields causes the portal to hang forever when linkify is executed for non-text fields. specify6/issues/688 is being reworked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants