• Members 11 posts
    Aug. 3, 2019, 1:05 a.m.

    I have installed Misago at PhranckoForum.com. It works perfectly when I go there using Chrome on my local computer. However, if I use a different browser, I get the "Something's Broken" message, which I have located in misago/templates/500.html. So I guess it is giving a 500 error, but I have no idea why. And why would I get the error only if I use a different browser or any browser on any other computer? I assume that is pointing to a cookie issue.

    But more importantly, what can I do about it?

    I am planning to go live with my website Phrancko.com (hosted on AWS) on Monday which has a link to PhranckoForum.com on DigitalOcean. I will have to remove the forum link to PhranckoForum.com if this can't be fixed before then. It won't be a disaster if there is no forum link in the beginning, but I hope that won't be necessary.

    Here's a bit more information, for what it's worth. I looked at cookies in my Chrome browser and there is one for misagocsrftoken and misagosessionid. After attempting to go to the forum on Safari, no cookie is created. I just get the 500 error screen.

    Can someone please help?

    Frank

  • Members 11 posts
    Aug. 3, 2019, 1:42 a.m.

    Now I know what I shouldn't have done. I logged out of the forum on my Chrome browser. So now I can't get back in because I am getting the 500 error message there too. Now the cookies make sense. I didn't realize I was still logged into the forum when I looked at cookies.

    Do I need to reinstall the forum software and start over or what?

  • Aug. 3, 2019, 1:51 a.m.

    I don't think this is caused by cookies. If you know how to navigate around filesystem in Linux, misago_docker has logs directory that will contain misago.log file. That file should contain details of error that prevents Misago from displaying page.

    Alternative is enabling debug via ./appctl, but this is dangerous because error page that is displayed in debug contains little too much data for comfort ;)

  • Members 11 posts
    Aug. 3, 2019, 4:57 a.m.

    Thanks for showing me where the logs are. I do know how to get around in Linux. Here is what is repeated through the log:

    [2019-08-02 19:33:21,258] ERROR Internal Server Error: /
    Traceback (most recent call last):
    File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
    TypeError: 'AnonymousUser' object is not subscriptable

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
    File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
    File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, callback_args, callback_kwargs)
    File "/usr/local/lib/python3.7/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args,
    kwargs)
    File "/usr/local/lib/python3.7/site-packages/django/views/generic/base.py", line 97, in dispatch
    return handler(request,
    args, **kwargs)
    File "/usr/local/lib/python3.7/site-packages/misago/threads/views/list.py", line 32, in get
    return render(request, self.template_name, template_context)
    File "/usr/local/lib/python3.7/site-packages/django/shortcuts.py", line 36, in render
    content = loader.render_to_string(template_name, context, request, using=using)
    File "/usr/local/lib/python3.7/site-packages/django/template/loader.py", line 62, in render_to_string
    return template.render(context, request)
    File "/usr/local/lib/python3.7/site-packages/django/template/backends/django.py", line 61, in render
    return self.template.render(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 171, in render
    return self._render(context)
    File "/usr/local/lib/python3.7/site-packages/django/test/utils.py", line 96, in instrumented_test_render
    return self.nodelist.render(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 937, in render
    bit = node.render_annotated(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
    return self.render(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/loader_tags.py", line 150, in render
    return compiled_parent._render(context)
    File "/usr/local/lib/python3.7/site-packages/django/test/utils.py", line 96, in instrumented_test_render
    return self.nodelist.render(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 937, in render
    bit = node.render_annotated(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
    return self.render(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/loader_tags.py", line 150, in render
    return compiled_parent._render(context)
    File "/usr/local/lib/python3.7/site-packages/django/test/utils.py", line 96, in instrumented_test_render
    return self.nodelist.render(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 937, in render
    bit = node.render_annotated(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
    return self.render(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/loader_tags.py", line 188, in render
    return template.render(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 173, in render
    return self._render(context)
    File "/usr/local/lib/python3.7/site-packages/django/test/utils.py", line 96, in instrumented_test_render
    return self.nodelist.render(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 937, in render
    bit = node.render_annotated(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
    return self.render(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/defaulttags.py", line 302, in render
    match = condition.eval(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/defaulttags.py", line 876, in eval
    return self.value.resolve(context, ignore_failures=True)
    File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 671, in resolve
    obj = self.var.resolve(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 796, in resolve
    value = self._resolve_lookup(context)
    File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 837, in _resolve_lookup
    current = getattr(current, bit)
    File "/usr/local/lib/python3.7/site-packages/misago/users/models/user.py", line 451, in acl_cache
    raise Exception("AnonymousUser.acl_cache has been removed")
    Exception: AnonymousUser.acl_cache has been removed

  • Members 11 posts
    Aug. 3, 2019, 5:57 a.m.

    Let me clarify a bit about myself. I am pretty good with Linux though I am a bit rusty because I actually retired from software development 14 years ago. I was fortunate enough to be an early Google engineer, so yes, I was pretty good back then. I have just this past year gotten back into coding with the development of Phrancko.com. As a result Docker is completely new to me since it was virtually unknown back when I retired. Even though I installed Misago on DigitalOcean and then installed Docker on my own computer to explore it, I still can't quite get my mind around it. I have looked and looked and cannot find the actual Django code anywhere on the server. (I understand Django as I wrote Phrancko.com in it.) The code must be there somewhere since I was running the forum just fine before today. So where can I find the code on the server?

    That question plagued me so much that I forked my own copy of the software and cloned it to my machine so I could at least look at the code.

    I also have one other unrelated question. You seem to indicate that I can upload other themes than the default theme, but I can't find any other themes to upload. Are there some themes available somewhere that I just haven't found?

    I truly appreciate your responsiveness now that I have found how to ask you my question here. I am very excited about having a Misago forum connected to my Phrancko.com. The setup worked so incredibly smoothly it was amazing! I realize you must be very busy and may not have much time to help me but any help you can provide is greatly appreciated.

    Frank

  • Members 11 posts
    Aug. 3, 2019, 8:13 a.m.
    check_box

    Marked as best answer by Aug. 3, 2019, 2:04 p.m..

    I can't believe it, I found the problem. I introduced the error when I replaced navbar.html with my own version. I found it by turning appctl debug on as you suggested. The backtrace in the browser then pointed to this line of navbar.html: {% if user.acl_cache.can_search %} and said "AnonymousUser.acl_cache has been removed". So I deleted that test and the associated {% endif %} and now it runs fine. It appears that was attempting to decide whether to present the search tab in the navbar, but I don't know why. Now it just shows it all the time I guess. Is that a problem?

    By the way, I turned debug mode off right after I identified the problem. Thanks for pointing out how to do that with appctl.

    I'm not sure how I was supposed to edit the navbar.html. If could shed some light on that, I'd appreciate it. Right now I don't even remember where I copied navbar.html from to change it. Except I do remember that it was a dark navbar the first time I displayed it. I found the css class to turn it back to the original color.

    So maybe that's another reason this is a good thing to have on your to-do list. It will keep newbies like me from messing up your code.

    Anyway, I'm happy that I can launch on Monday with the forum up and running, Yay!

    If you'd like to take a look, as I mentioned before, it's at PhranckoForum.html and is available now.

    Frank

  • Aug. 3, 2019, 2:04 p.m.

    Happy to see you've fixed it!

    It looks like you've based your changes on the old navbar code. Here is current navbar, as used since Misago 0.20:

    raw.githubusercontent.com/rafalp/Misago/master/misago/templates/misago/navbar.html

    You need to have your docker container for Misago running. To confirm that, you can run docker stats and confirm that misago_docker_misago_1 appears on the list.

    If its on, you can run ./appctl bash to connect to this container and initialize bash session in it. Inside the container you should be able to navigate to the /usr/local/lib/python3.7/site-packages/ directory. This is where all Python packages (Misago included) are.

    Themes system is new addition to the Misago, so I guess there are no themes available for download. I have a hope that situation will change in future, but until then

  • Members 11 posts
    Aug. 3, 2019, 4:04 p.m.

    Thanks so much!

    That navbar worked perfectly with just the additional link back to the main site. And I even found a material-icon arrow to indicate going back when the navbar is compacted. It is perfectly integrated now as far as I am concerned.

    And now I even know how to see the code. Thanks for that too.

    I appreciate your help and your responsiveness!

    Frank