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

[Search] url seems not work #3111

Closed
zitsen opened this issue Sep 29, 2015 · 8 comments
Closed

[Search] url seems not work #3111

zitsen opened this issue Sep 29, 2015 · 8 comments

Comments

@zitsen
Copy link

zitsen commented Sep 29, 2015

The fields's url field is not work at this document page Search - Examples. Not work in my case with version both 2.1.3 and 2.1.4. In previous 2.0.x, it works as expected.

Is it a document error or deprecated or a bug?

Thank you for reply.

@jlukic
Copy link
Member

jlukic commented Sep 29, 2015

It's working for me on settings pages and in my code. Keep in mind its apiSettings: { url: 'foo' }

@zitsen
Copy link
Author

zitsen commented Sep 30, 2015

@jlukic , not the apiSettings url, it is the fields url field - actually it does not point to anything.

@jlukic jlukic reopened this Sep 30, 2015
@jlukic jlukic added this to the 2.1.x milestone Sep 30, 2015
@unplugandplay
Copy link

just fixed it on my machine , the problem is on those lines :

            $.each(category.results, function(index, result) {
              if(response[fields.url]) {
                html  += '<a class="result" href="' + response[fields.url] + '">';
              }
              else {
                html  += '<a class="result">';
              }

More exactly

   if(response[fields.url]) {
                html  += '<a class="result" href="' + response[fields.url] + '">';
              }

response is used instead of result
so should be:

   if(result[fields.url]) {
                html  += '<a class="result" href="' + result[fields.url] + '">';
              }

And fields: { ... } should define

url : 'url'

here only

actionURL       : 'url' 

is defined

@xaeroseven
Copy link

We are experiencing this same issue as well, thanks for the patch notes @unplugandplay. @jlukic - let us know if there is a patch release upcoming to resolve this, thanks!

@hayfever
Copy link

Thanks @unplugandplay, thought I was crazy. Fixed for me as well.

@awgv
Copy link
Member

awgv commented Oct 23, 2015

Not only that, it seems you can't follow a href with Enter key—it just pastes the title into the search field. If someone knows how to fix it until a future release, please reply.

@jlukic jlukic modified the milestones: 2.1.5, 2.1.x Oct 23, 2015
@jlukic
Copy link
Member

jlukic commented Oct 23, 2015

I'll try to get to this shortly

@jlukic
Copy link
Member

jlukic commented Nov 1, 2015

Fixed with #3206

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

6 participants