Heroku displays the same page twice one under the other

116 views
Skip to first unread message

Jasmine Bader Weingarten

unread,
Jun 20, 2021, 6:22:33 PM6/20/21
to oTree help & discussion
Hi, I have a slight problem...
On my local server my app works as expected but when I deploy it, it presents each page twice, one under the other.
I don't know if it's related but on each round, the same participant is assigned to a different group (players_per_group = None).
If it matters, the pages are randomized using rounds, exactly as the example in the documentation says.

I am using otree<5

Thank you in advance,
Jasmine

Chris @ oTree

unread,
Jun 20, 2021, 6:25:51 PM6/20/21
to oTree help & discussion
Can you share your HTML template file for the page that is being duplicated?

Chris @ oTree

unread,
Jun 20, 2021, 6:29:50 PM6/20/21
to oTree help & discussion
And if you use an "include" statement in the template, also send the sub-template.

Siyu

unread,
Oct 4, 2021, 11:08:15 AM10/4/21
to oTree help & discussion
Is this problem solved? I have the same issue. When tested locally everything is fine. But once uploaded to Heroku there are pages which display twice on the same webpage one under the other

Chris @ oTree

unread,
Oct 4, 2021, 11:43:45 AM10/4/21
to Siyu, oTree help & discussion
Can you post your full template?
I have seen issues like this happen when 2 templates have the same name that differ only by case, for example Instructions.html and instructions.html

Sent from my phone

On Oct 4, 2021, at 8:08 AM, Siyu <wangs...@gmail.com> wrote:

Is this problem solved? I have the same issue. When tested locally everything is fine. But once uploaded to Heroku there are pages which display twice on the same webpage one under the other
--
You received this message because you are subscribed to the Google Groups "oTree help & discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otree+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/otree/9ffec96c-9d73-4f97-94f3-887416b8764en%40googlegroups.com.

Chris @ oTree

unread,
Oct 6, 2021, 11:18:53 AM10/6/21
to oTree help & discussion
It looks like this can also happen if the template uses {% extends %} at the beginning, but there is some space before the {% extends %}, for example note the leading space below:

 {{ extends "global/Page.html" }}
{{ block title }}title...{{ endblock }}

Siyu

unread,
Oct 6, 2021, 11:33:29 AM10/6/21
to oTree help & discussion
That makes a lot of sense! I had to recreate all the pages by using the page template which didn't duplicate. It solved the problem but I couldn't figure out why. After seeing your answer, I simply deleted the space before {% extends %} and the duplication all gone!.

Appreciate the help!

Reply all
Reply to author
Forward
0 new messages