Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: Pandos on May 16th, 2014, 09:09 AM

Title: [switch languages] Weird error
Post by: Pandos on May 16th, 2014, 09:09 AM
If you change to your desired language you'll get the following error on every topic :

Invalid database variable, {query_see_topic}.

Debug:
Quote
Invalid database variable, {query_see_topic}.
Function: Display
Datei: /gz/app/Display.php
Zeile: 102
Switching back to another language will not fix the problem.
Title: Re: [switch languages] Weird error
Post by: Pandos on May 16th, 2014, 09:25 AM
Purging cache and disabling and re-enabling languages solves this issue. But it comes back if you change your language again.
Title: Re: [switch languages] Weird error
Post by: Pandos on May 19th, 2014, 04:50 PM
This only happens when you switch to Cache Level 2.
Title: Re: [switch languages] Weird error
Post by: Nao on May 19th, 2014, 07:32 PM
Still unable to reproduce, I'm afraid... :-/
Title: Re: [switch languages] Weird error
Post by: Pandos on May 19th, 2014, 07:49 PM
Gotcha!
There seems to be a problem with memcached support.
Code: [Select]
memcache_pconnect(): Can't connect to 127.0.0.1:11211, Connection refused (111) in /wedge/core/app/Subs-Cache.php on line 2042

Cool, because I configured Memcached-Settings to listen on another IP :D (192.168.148.9:11211)
Title: Re: [switch languages] Weird error
Post by: Nao on May 20th, 2014, 12:42 AM
Maybe you should use something else than memcache(d)... PHP 5.5's built-in cache + APCU, maybe? :P

Anyway, well, I guess it's a problem with deleting the keys for memcached when regenerating stuff... Maybe it's keeping an old copy of query_see_*, or something.

For the record, opening this post triggered the infamous layout bug for me (super tall posts). This is the... trigger for me. I'll try to do a flexbox-less version of Wedge.
Title: Re: [switch languages] Weird error
Post by: Pandos on May 20th, 2014, 01:10 AM
No, I love memcached :D
Tested with different servers and hosts in cache path.
It's a bug in Wedge :D

Will memcached start in verbose mode tomorrow.. I've got some ideas. :)
Title: Re: [switch languages] Weird error
Post by: Pandos on May 20th, 2014, 12:46 PM
It's not only related to memcached.
Play a bit with cache settings and set it to filebased and caching level 2.
Et voilĂ !

Could it be that there are some keys with spaces?
We should fix this. Memcached will discard them silently: Don't know how other caches behave.
Code: [Select]
$key = str_replace(' ', '_', $orig_key);
There are no cache entries in level 2. Time for generating a page jumps from 0.07s (level1) to 0.32s (level2&3).



Title: Re: [switch languages] Weird error
Post by: Nao on May 20th, 2014, 03:54 PM
I swear to you, I'm not getting any errors at all...

As for cache keys, IIRC, I 'fixed' them by forcing the keys to be md5 hashes, rather than the original keys.

Your cache generation times... They don't match what I'm getting locally. Then again, I only see real improvements in performance when using level 1; the rest is just too heavy for my taste.

Anyway, since it's likely I'm gonna take on your hosting offer (:)), and I'm already trying to find a replacement for my FTP client (which doesn't support SFTP, boohoo...), I guess I'll be able to test locally, too!
Title: Re: [switch languages] Weird error
Post by: Nao on May 20th, 2014, 03:56 PM
I also need to fix the memcached issue, so that'll be good...
Title: Re: [switch languages] Weird error
Post by: Nao on May 30th, 2014, 01:59 PM
I think this is fixed...

I was able to reproduce by logging off from my mobile phone, and then trying to go to a board.
After some backtracking, I figured out that it was due to a missing we::permissions() call in the loadPermissions function.

Nasty one, and my fault I'm afraid!
(Still can't figure out why you got this in that situation, though, but please confirm whether it's fixed...)
Title: Re: [switch languages] Weird error
Post by: Pandos on May 30th, 2014, 04:53 PM
And fixed :)