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

Nao

  • Dadman with a boy
  • Posts: 16,082
Plugin execution
« on January 25th, 2013, 10:40 AM »
I noticed something odd... On some pages, sometimes, the 'rev 1873' mention in the footer just doesn't show up.
This is in any browser (I think), Warm (probably all other skins too). Last reproduced on the Post page (i.e. where I am right now), usually refreshing the page will fix it. At one point I refreshed again and it disappeared again (after being there the last time). All subsequent (20+) refreshes had the rev number.

So I'd say this is very, very random, but if the plugin executing on every page is critical, it might be a show-stopper...

Sorry I can't help more. Just try it a couple of minutes and tell me if you can reproduce!

MultiformeIngegno

  • Posts: 1,337
Re: Plugin execution
« Reply #1, on January 25th, 2013, 11:22 AM »
I'm sorry I can't reproduce this.. I tried with different skins, different topics/boards but I always see the rev..

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Plugin execution
« Reply #2, on January 25th, 2013, 11:51 AM »
Just reproduced on refresh #3 of this very page. Using Safari 5.1 on regular Display page (not Post page.)

And again after posting this... Three refreshes in a row! Refresh #4 had the rev number, and refresh #5 didn't.
I'll just stop here, I won't spend the day reloading :P

MultiformeIngegno

  • Posts: 1,337
Re: Plugin execution
« Reply #3, on January 25th, 2013, 11:56 AM »
I refreshed 6 times, nothing :P

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Plugin execution
« Reply #4, on January 25th, 2013, 12:01 PM »
Anyone else..?
Posted: January 25th, 2013, 12:01 PM

:edit: Had rev number on reading this page. Quick replied. Page refreshed with my post, and with no rev in it. Can you check what it does after posting..?

:edit: Did another quick reply, Wedge didn't hide it this time though.

:edit: It hid it after I pressed Merge Posts :P

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Plugin execution
« Reply #5, on January 25th, 2013, 02:20 PM »
That is truly strange. But it sounds to me more like it's a bug of the plugin than of execution as such. Need to double check - but I wasn't able to get it to misbehave myself locally when I wrote it.
Posted: January 25th, 2013, 02:19 PM

Wait... actually... I can imagine one case where it might - if it ever has to play switcheroo on languages, which it can do under certain circumstances of merging. The plugin is a bit cheeky, it just fudges the language strings.
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 #6, on January 27th, 2013, 11:28 AM »
Merging what..? Posts? As I was saying, this happens from time to time, just by refreshing a page...
I'm at a loss too, though. I've never, ever seen the Skin Selector disappear for instance. Maybe it's the exact hook that's to blame..?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Plugin execution
« Reply #7, on January 27th, 2013, 03:07 PM »
Not merging, moving. The move topics stuff does a strange switch of languages.

I still haven't seen it fail yet...

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Plugin execution
« Reply #8, on January 27th, 2013, 06:30 PM »
Try to switch to French.
It seems to happen only in French, actually... That may be a clue?

godboko71

  • Fence accomplished!
  • Hello
  • Posts: 361
Re: Plugin execution
« Reply #9, on January 27th, 2013, 07:59 PM »
Only seems to happen on topic pages after a refresh with the French language being used.
Thank you,
Boko

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Plugin execution
« Reply #10, on January 27th, 2013, 09:15 PM »
After switching languages and browsing around, it happened to me the grand total of once where it didn't show up.

That would imply that under some set of circumstances, the hook isn't being called for some reason, but it's not clear why or why not that might be the case.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Plugin execution
« Reply #11, on January 28th, 2013, 06:45 PM »
As I said, it also happens to me on Post pages... Not only Display. But it's true that I haven't been able to reproduce it anywhere else (although I haven't tested much.)
Last time I tried on a topic page, I got it to 'omit' the rev plugin *four* times in a row. Then it showed it twice, then hid it again... See what I mean.
I think it should be fixed. There's no telling whether or not another plugin will go through the same hassles. Maybe it's due to the hook being loaded too soon...?

So... Display.php + hook in loadTheme() + French language =...?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Plugin execution
« Reply #12, on January 28th, 2013, 06:47 PM »
It's not Display.php, loadTheme is called long before Display.php even loads.

It means loadTheme is ending earlier than expected - and if so that would imply it is originally an SMF bug ;)

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Plugin execution
« Reply #13, on January 28th, 2013, 06:52 PM »
Okay, I've managed to work it out.
It's a Wedge bug, all I can say ;)
Also: the plugin is always executed, even if it doesn't show up.
It's due to the way languages are loaded: English first, then French second... Sometimes it'll execute the plugin on English, then rewrite with the French version, and thus the rev number doesn't show up. It has to execute on the second run...
Posted: January 28th, 2013, 06:49 PM

Hmm, nope, sorry it's always applied to the French file... I misread the string. So -> English loaded -> French loaded -> plugin executed -> at this point it's all fine -> then the French language is loaded again..?!
If you'll look at the admin log below the page, here's the loading order:

index.english (default), index.french (default), index.english (default), index.french (default),

So, plugin gets executed in the middle of these. Not at the end though. And I'm not sure why languages are loaded twice..? Isn't this something we worked on fixing at some point?
Posted: January 28th, 2013, 06:51 PM

We have to find out why loadTheme() is called twice, to begin with.
Does Wedge have a protection to prevent hooks from executing twice? That would explain everything... (I mean, it'd prove that it's due to loadTheme being called twice.)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Plugin execution
« Reply #14, on January 28th, 2013, 06:53 PM »
O RLY

OK, so yeah, I suggested there might be issues with language juggling ;)

I know we fixed it to load English first all the time, but I don't know why it's loading them twice. What I'd be inclined to do is try and dump the backtrace upon hitting loadLanguage where it's called to load 'index' to see why it's loading them twice.

* Arantor is still fighting with security issues right now.