New revs - Public comments

Nao

  • Dadman with a boy
  • Posts: 16,082

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #437, on September 30th, 2012, 03:31 AM »
Install is currently completely broken, due to language caching - because it's trying to call updateSettings on the first pass, which of course it can't do because it doesn't have DB settings of any kind.

Guess I *really* need to set up caching now. That is, once I rebuild my installation >_<
Re: New revs - Public comments
« Reply #438, on September 30th, 2012, 04:00 AM »
OK, so I've hacked together something that works for the time being.

So, the contents of my <head> is thus:

Code: [Select]
<head>
<link rel="stylesheet" href="http://localhost/wedge/css/member-chrome22-1348934260.css">
<!-- Powered by Wedge, © Wedgeward - http://wedge.org -->
<title>Localhost Wedge - Home</title>
<link rel="shortcut icon" href="http://localhost/wedge/favicon.ico" type="image/vnd.microsoft.icon">
<link rel="canonical" href="http://localhost/wedge/index.php">
<link rel="search" href="http://localhost/wedge/index.php?action=search">
<link rel="alternate" type="application/atom+xml" title="Localhost Wedge - Latest Posts Feed" href="http://localhost/wedge/index.php?action=feed">
<meta name="generator" content="Wedge">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script src="http://localhost/wedge/js/script-1348943198.js"></script>
</head>

Uncaught TypeError: Object [object Object] has no method 'sb'
Re: New revs - Public comments
« Reply #439, on September 30th, 2012, 04:38 AM »
Seems that sbox.js is minified into things when jquery_origin is local but not when it isn't - at least for me.
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: New revs - Public comments
« Reply #440, on September 30th, 2012, 05:24 PM »
The WEDGE_INSTALLER hack is fine, as long as we remember to remove it once your language deltas are implemented... Because at that point we won't need to cache this data, will we?
Oh yes, we'll probably still need to record the fact that a script file uses at least one language file... Hmm. It's probably better than doing one file_exists too many. But it's really micro-optimizations at this point

I don't have any problems with sbox.js myself. Are you sure you can reproduce this...?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #441, on September 30th, 2012, 05:29 PM »
Quote
I don't have any problems with sbox.js myself. Are you sure you can reproduce this...?
Every fresh install reproduces this, without fail, even on a real server. Try it - grab all the files except for other/ and put them into a folder, then also grab the Settings and install files from other/ and put them in that folder, and run it.

Nao

  • Dadman with a boy
  • Posts: 16,082

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #443, on September 30th, 2012, 11:10 PM »
It has been doing it for months on every single fresh install I perform.

The fix I've added is just enough to get through installation, it doesn't change this problem.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #444, on October 1st, 2012, 07:10 PM »
But I thought the problem was introduced with my updateSettings call in the language cache code..?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #445, on October 2nd, 2012, 03:01 AM »
That would be the case if it weren't for the fact I'm talking about two completely different problems.

The problem of the installer crashing and burning is still related to updateSettings. The installer hack gets around that.

The problem of sbox.js being undefined on every single fresh install has been a problem for many months now. I was attempting to debug it - at which point you asked me what was in <head>, I attempted to do a fresh install to see what the state of play was, only to find it completely broken... but this problem is not resolved.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #446, on October 2nd, 2012, 10:50 PM »
Quote from Arantor on October 2nd, 2012, 03:01 AM
That would be the case if it weren't for the fact I'm talking about two completely different problems.

The problem of the installer crashing and burning is still related to updateSettings. The installer hack gets around that.
Not completely, though... updateSettings is called before even WEDGE_INSTALLER is defined, because the language files are loaded first. I worked around that by initializing language strings only after setting the constant, with an $init var to ensure it's only done once (because we're inside a loop at this point.)
The problem doesn't show up at first because the error message(s) (with XDebug) are shown inside an HTML tag, so you can't see them on the HTML rendition.
Quote
The problem of sbox.js being undefined on every single fresh install has been a problem for many months now.
Indeed. From what I see, it's quite simple... It never was defined at all in the add_js_file() call to script.js. I've added it, hopefully that'll fix it. I'm also adding common.css and sections.css to the loaded CSS. Can't believe I didn't even check that..?!
Quote
I was attempting to debug it - at which point you asked me what was in <head>, I attempted to do a fresh install to see what the state of play was, only to find it completely broken... but this problem is not resolved.
I don't remember asking you about head, though... Or maybe that was a long time ago?!
Another bug: the cache purge at the end of the install process still considers /cache/ to be where it can find CSS and JS files. Uh. I've fixed that... Same with the 404 redirect code in QueryString.php.
And I've set a default $theme['default_theme_url'] because it's used in loadLanguage and isn't defined during install. That one may be a SMF bug, though...! And again, the errors don't show up because they're inside a tag.

Anyway... I'm still right in the middle of all this. I'm stumped that I had so many outstanding bugs in the install script. Although it's true I haven't run it in a long time...
Caching is cool. But it really adds a lot of complexity... :)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #447, on October 2nd, 2012, 11:13 PM »
Quote
Not completely, though... updateSettings is called before even WEDGE_INSTALLER is defined, because the language files are loaded first. I worked around that by initializing language strings only after setting the constant, with an $init var to ensure it's only done once (because we're inside a loop at this point.)
Odd, if that were true it should have failed before that - the error in question is that wesql doesn't exist, which is why updateSettings fails. wesql can't exist until there are DB settings and if it does work it means it's using settings it shouldn't be.
Quote
The problem doesn't show up at first because the error message(s) (with XDebug) are shown inside an HTML tag, so you can't see them on the HTML rendition.
No, I just got to a screen that only had a gradient and nothing else... ;) I couldn't even press anything to go to the next page.
Quote
I don't remember asking you about head, though... Or maybe that was a long time ago?!
It was last week - http://wedge.org/pub/feats/6803/new-revs-public-comments/msg282124/#msg282124

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #448, on October 2nd, 2012, 11:26 PM »
I've fixed sbox.js, now it correctly applies its style to the language select box.
All that's left to fix is the CSS files showing a "../../Themes/" relative URL (i.e. one "../" too many), I must admit I don't know where to start with this one... (It's either in Subs-Cache or Class-CSS, obviously.)
Will have to wait until tomorrow...
Quote from Arantor on October 2nd, 2012, 11:13 PM
Odd, if that were true it should have failed before that - the error in question is that wesql doesn't exist, which is why updateSettings fails.
I don't know. Perhaps I'm wrong. The error I was trying to fix was the default_theme_url bug, which I fixed later by adding a proper alias for it. Perhaps moving the code around wasn't needed...

So, what you're saying is that updateSettings can be called without issues in the installer as long as wesql is loaded..? (I haven't looked into it...)
Quote
No, I just got to a screen that only had a gradient and nothing else... ;) I couldn't even press anything to go to the next page.
And the HTML had what...?Alrighty :)

Oh, I'm probably gonna have to fix language caching as well... I'm not sure... But it seems that the temp cache file for JS doesn't store the language, it always uses English strings even though my default language is French... Hmm.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #449, on October 2nd, 2012, 11:38 PM »
Quote
So, what you're saying is that updateSettings can be called without issues in the installer as long as wesql is loaded..? (I haven't looked into it...)
Not entirely. The error it fails on, at the first hurdle is the wesql is not loaded. But that's symptomatic of a larger problem - it isn't going to get database settings it can actually use until the beginning of the third step (step 1 = welcome + checking for fundamentals, step 2 = gathering database settings, step 3 is getting other stuff)

That's really why I took the step I did - blocking all updateSettings calls until the very last step of the installer (which itself calls updateSettings, albeit indirectly)
Quote
And the HTML had what...?
Not a fat lot in it, seeing how it was fatally erroring out during population of the <head>. Consider the backtrace that would be occurring: a language file is loaded at the start of installation, but it fails there - the only thing that exists is the <head> tag, it's failing after the head tag is output.