Ce sujet a été marqué résolu par son auteur, le 26 Mai 2013 à 12:52

Arantor

  • As powerful as possible, as complex as necessary.
  • Messages: 14 278
Re: Plugin execution
« Réponse #30, le 15 Avril 2013 à 17:13 »
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
  • Messages: 16 082
Re: Plugin execution
« Réponse #31, le 15 Avril 2013 à 17:17 »
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.
  • Messages: 14 278
Re: Plugin execution
« Réponse #32, le 15 Avril 2013 à 17:22 »
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
  • Messages: 16 082
Re: Plugin execution
« Réponse #33, le 15 Avril 2013 à 17:31 »
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.
  • Messages: 14 278
Re: Plugin execution
« Réponse #34, le 15 Avril 2013 à 17:37 »
Yes, but I intend to add it as a permanent feature to the debug log.

Nao

  • Dadman with a boy
  • Messages: 16 082
Re: Plugin execution
« Réponse #35, le 16 Avril 2013 à 12:09 »
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.
Posté : 15 Avril 2013 à 17:43

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 ;)
Posté : 15 Avril 2013 à 17:46

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..?
Posté : 15 Avril 2013 à 17:47
Citation de Nao le 28 Janvier 2013 à 19:23
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...