This topic was marked solved by its starter, on May 26th, 2013, 12:52 PM

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Plugin execution
« Reply #30, on April 15th, 2013, 05:13 PM »
What I want to know is why there are two separate load requests to the index page. That's fairly clearly the problem: index is loaded, the injection applied, then it's loaded again overwriting the injection.

Now, I could find a later place in which to make the injection but I think what I'd rather do is expand the debugging to find out where the call is coming from.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Plugin execution
« Reply #31, on April 15th, 2013, 05:17 PM »
Did you quick-edit the post above..? Because I got the 'New' icon another time after I pressed Refresh. Also, that refresh caused rev 2051 not to show up. I made a dozen more refreshes, and it didn't happen again, but I guess it means it's not due to the wrong caching level, or somethin'.

I don't know why the index language is reloaded. I find it even weirder, that the SkinSelector language file was loaded in one instance, and not in the other...

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Plugin execution
« Reply #32, on April 15th, 2013, 05:22 PM »
I did not, no. It's definitely screwy. I'm willing to bet there's a locking condition and/or caching.

What I'll do is extend the debug log to include where the call to loadLanguage was made from.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Plugin execution
« Reply #33, on April 15th, 2013, 05:31 PM »
Reproduced in French, too...
Same files loaded, really. Same logic.

Adding debug_backtrace to loadLanguage is exactly how I fixed it the last time, so I'll do that here again, and give it a few minutes... ;)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Plugin execution
« Reply #34, on April 15th, 2013, 05:37 PM »
Yes, but I intend to add it as a permanent feature to the debug log.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Plugin execution
« Reply #35, on April 16th, 2013, 12:09 PM »
So... Reproduced with this file list:

index.french (default, cached), plugin.french (Dragooon:WeMentions), Notifications.french (default, cached), index.english (default, cached), index.french (default, cached), Post.french (default, cached), ActiveMembers.french (live627:active_members), lang/TopicSolved-Display.french (Arantor:TopicSolved), SkinSelector.french (Wedgeward:SkinSelector), Stats.french (default, cached).

I've cleaned up the error log, its last entry is for that particular page load (17:38 for me, probably says 16:38 for you). I THINK. I can't say 100%, but I immediately stopped loading that page after I reproduced the problem, and went to the admin menu, while I was also disabling the logging of language file loading.
Only thing that surprises me is that it has like, 6 entries only for the page... Oh wait, it's probably right -- it can load multiple files per call.
Posted: April 15th, 2013, 05:43 PM

Note that file lines are related to the current online rev, i.e. 2051, not the latest ones.
Also, I don't really see the point in making language loading a feature in the debug area... A better feature, would be to prevent logging some stuff like the block list, which is nice when you're reading a topic page and don't want to have this huge block list come up at the end, eheh... The magic of mini-skeletons ;)
Posted: April 15th, 2013, 05:46 PM

So, interestingly... This looks like the problem is AGAIN due to getRePrefix...
I should have considered it, ah ah...

It simply wasn't "updated" for your new cache system, I guess..?
Posted: April 15th, 2013, 05:47 PM
Quote from Nao on January 28th, 2013, 07:23 PM
And, fixed!
Instead of reloading the index language a last time, I just saved $txt before that, and restored $txt immediately after... It should also be much faster, eh!
The reason this was broken, is that, hmm... It looks like I never committed that; AND I lost my changes. I don't know what happened, at all.
Anyway, it's an easy fix, so I'm redoing it...

Bummer. Hoping this didn't happen more than once, otherwise...