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

Error 500 searching #1090

Open
avdata99 opened this issue May 31, 2024 · 7 comments
Open

Error 500 searching #1090

avdata99 opened this issue May 31, 2024 · 7 comments
Assignees

Comments

@avdata99
Copy link
Member

URL: https://okfn.org/en/search/?q=common

image

Logs

Exception Type: NoReverseMatch at /en/search/
    raise NoReverseMatch(msg)
Raised during: haystack.views.SearchView
Exception Value: Reverse for 'person' not found. 'person' is not a valid view function or pattern name.
@avdata99
Copy link
Member Author

The search result template /foundation/search/templates/search/results.html includes

{% if search_result.content_type == 'organisation.person' %}
  {% with person=search_result.object %}
    {% include "search/organisation/person.html" %}
  {% endwith %}
{% endif %}

person.html includes

<a class="block text-okfn-sm group" href="{% url 'person' person_id=person.id %}">

And for some reason the person URLs in not availbale

But the URL with name person exists at /foundation/organisation/urls/units.py

re_path(r'^(?P<person_id>\d+)/$', PersonView.as_view(), name='person')

@avdata99
Copy link
Member Author

@avdata99
Copy link
Member Author

avdata99 commented May 31, 2024

Prod:
Application is empty for the team page

image

At staging search works and it's connected

image

I updated this for prod, also published pending changes in page but still fails

@avdata99
Copy link
Member Author

After re-deploying the application now it works.
@pdelboca @lucpretti we need to be carefull with the application setting for pages.
It looks like if they are not connected the URL is not available and the website can fail

@avdata99
Copy link
Member Author

avdata99 commented Jun 5, 2024

@pdelboca I did not manage to find the error

image

Lucas says that he fill the board page with all cards (like at the team page)
I didn't delete those card from board but they are not available at the page

The board page shows the cards but they are not editable like in team.
The code for both templates include members from code directly

image

The board page is related with BoardAppHook and the teams page with UnitsAppHook
It's not clear for me what's happening. Maybe you can take a look and discover what happened.

@lucpretti
Copy link
Contributor

I've just tried to add new blocks to the Team page and it strangely got back to the old layout with old content after I published it. I really think it's related to the applications that were reconnected.

Could you please look into it asap please?

@avdata99
Copy link
Member Author

@lucpretti, we are getting 500 error again for searches that returns people (internal person URL).
I'll look for a different approach.
The app needs to be connected to ANY page in order to allow the website to discover this internal person URL

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

3 participants