Edgeworth E. Euler
Member

How can I fix this?
My setup is nginx/php5-fpm, behind a loadbalancer behind cloudflare.
It used to work, but all of the sudden, it's stopped! :O
did you by chance have firebug open while doing that....
I have noticed a bug with firebug that gives me the same error with any submit action be it templates or posts or at almost any site which I can submit data. I fixed it by copying the text i didn't want to lose, made sure firebug was not enabled on the domain in question and refreshed the page. After that I could submit info again. I don't know if this is related to your issue but if you use firebug try that above.
Lol my bad didn't even notice that...I'm using chrome.
All the other admins of my forums (who use different browsers) report the same error.
Probably too many styles installed which is causing it to take longer than 30 seconds such that it times out. Two options:
1) Remove some of your styles.
2) Edit the files to increase the timeout:
http://xenforo.com/community/threads/one-styles-code-is-merging-with-another.19468/#post-250414
Lock wait timeout exceeded
That is a different timeout error. Similar problem as before except it is coming from MySQL.
If you have root access to the server then you can edit the my.cnf file (usually at /etc/my.cnf) to increase the value of innodb_lock_wait_timeout. Increasing that limit should avoid this error.
Or again you can remove some styles to speed up the cache rebuild and avoid these timeouts.
INSERT INTO xf_template_compiled (style_id, language_id, title, template_compiled) VALUES (?, ?, ?, ?) ON DUPLICATE KEY UPDATE template_compiled = VALUES(template_compiled)
We rotate different header / graphics for each subforum, is there a way, or even an addon that could do that for us with out the need for extra styles? :O
<xen:if is="{$forumId} == 2">
<img src="path/to/image/for/nodeid2.jpg" />
</xen:if>
<xen:set var="$banners.1"><center><img src="http://static.encyclopediadramatica.ch/edf/edfbit11banner.jpg" /></center></xen:set>
/* snip */
<xen:set var="$banners.20"><center><img src="http://static.encyclopediadramatica.ch/edf/edoibanner.png" /></center></xen:set>
{xen:raw '$banners.{xen:calc '({$serverTime} % 20) + 1'}'}
<xen:set var="$banners.1">banner one</xen:set>
<xen:set var="$banners.2">banner two</xen:set>
<xen:set var="$banners.3">banner three</xen:set>
<xen:set var="$banners.4">banner four</xen:set>
<xen:foreach loop="$banners" value="$curBanner" i="$i" count="$count">
</xen:foreach>
count: {$count}
Hey that's my guide.
http://xenforo.com/community/threads/display-a-random-banner.19563/
That code already displays a random element from the array with that modulo calculation. The only way I know of to get the length of an array using template syntax is with xen:foreach. For example:
Code:<xen:set var="$banners.1">banner one</xen:set> <xen:set var="$banners.2">banner two</xen:set> <xen:set var="$banners.3">banner three</xen:set> <xen:set var="$banners.4">banner four</xen:set> <xen:foreach loop="$banners" value="$curBanner" i="$i" count="$count"> </xen:foreach> count: {$count}
Put this in your templates. You will see that {$count} equals 4.
We use essential cookies to make this site work, and optional cookies to enhance your experience.