Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Fixed SMF bugs
« Reply #30, on March 1st, 2012, 05:58 PM »
Quote
It's just an equivalent of (?!\w)
Then I'd be *extra* careful. As per this post way back, \w would exclude the three characters outlined, but it still includes a lot of characters I wouldn't really want in bbcode.
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,080
Re: Fixed SMF bugs
« Reply #31, on March 1st, 2012, 07:31 PM »
Was playing with forum URL changes, and I've got to say, it's pretty complicated to update everything...
Wedge tells me to click here to update URLs. So I go there and it's just the theme page, so I update the theme data but the regular forum URL page isn't mentioned (although I did manually modify the Settings.php page), and Smiley sets, avatar and attachment URLs aren't mentioned either.

Also, even after updating all of these, I still needed to empty my JS cache manually. (Not sure why, but CSS was okay...)

Other issues: in the Attachment pruning page, I tried all three options to delete all files. The first one deleted a few files. The 'more than X days' setting was flawed: if I type in 0, it won't delete all files.
And the other two choices are similar. I was totally unable to delete any of the remaining files (dated today, 11:30am).

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Fixed SMF bugs
« Reply #32, on March 1st, 2012, 07:49 PM »
To a degree, this is why SMF always suggests use of repair_settings.php to fix everything.

As far as the attachment pruning, I seem to recall 0 being ignored as it falls foul of empty(), though it is a little unlikely to want to prune everything. I'm not sure it is a bug as a result. But I can look into it.

Nao

  • Dadman with a boy
  • Posts: 16,080
Re: Fixed SMF bugs
« Reply #33, on March 1st, 2012, 09:52 PM »
Quote from Arantor on March 1st, 2012, 07:49 PM
To a degree, this is why SMF always suggests use of repair_settings.php to fix everything.
I've never really used that one. Don't even know if it works with Wedge actually...
Quote
As far as the attachment pruning, I seem to recall 0 being ignored as it falls foul of empty(), though it is a little unlikely to want to prune everything. I'm not sure it is a bug as a result. But I can look into it.
Definitely.

Also, max width and max height for attachment thumbnails are set to 400 in your code... Any reason for that? Even here, the max width is much higher than that. I changed it locally to 1280x1024 which is probably good enough for maximum thumbnail dimensions... :P
Speaking of which, how about setting 'int' to have a 'min' of 0 by default? You've already set it to 0 pretty much everywhere, really...

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Fixed SMF bugs
« Reply #34, on March 2nd, 2012, 10:38 AM »
Quote
I've never really used that one. Don't even know if it works with Wedge actually...
There's actually no reason why it shouldn't work for most things. It won't support the plugindir variable and doesn't support multiple attachment folders (not even for SMF) but everything else should work the same.
Quote
Also, max width and max height for attachment thumbnails are set to 400 in your code... Any reason for that? Even here, the max width is much higher than that. I changed it locally to 1280x1024 which is probably good enough for maximum thumbnail dimensions...
Well, setting a max is good because it prevents the textboxes being huge (otherwise they're long enough to easily fit a 32 bit int), and I just figured 400 was a sane size for a *thumbnail*.

Looking at this site, I don't think any thumbnail size is set (that's what 0 is for) but image attachments are capped at 640 wide, which means no thumbnail is generated.
Quote
Speaking of which, how about setting 'int' to have a 'min' of 0 by default? You've already set it to 0 pretty much everywhere, really...
I actually didn't want to set a blanket default but it's probably for the best.
SMF bug 4840 (disabling search engine tracking can break who's online)
« Reply #35, on March 2nd, 2012, 11:44 AM »
Curious error, though probably not very common to occur.
Posted: March 2nd, 2012, 11:09 AM

Fixed in Wedge r1417. Oddly enough it was a very simple fix, not even as complex as the one suggested in the bug report (no need to mess around unsetting session, just test session is set and that the relevant $show_method is also set. In our case it's even the very same isset call.
SMF bug 4904 - external avatar URLs dropping %20 from the URL
« Reply #37, on March 2nd, 2012, 12:13 PM »
At least the replacement needs to be altered to prevent this, but it is worth spending a moment to explore whether rawurlencode is worth applying here or not (possibly not)
Posted: March 2nd, 2012, 10:34 AM

I've patched this in r1417, but I haven't done rawurlencode on it yet.

I was about to mark this one as done then I suddenly had a thought, and bad mojo happens if it contains fun characters like ', like an uncaught exception if it has to go do a web lookup.
Posted: March 2nd, 2012, 11:46 AM

Actually, I was wrong, the exception wasn't occurring because of the fun characters (they simply get htmlspecialchars'd somewhere as far as I can tell, no idea why that is right now), but because the URL I'd supplied caused a redirect which threw an exception. So I beefed up exception handling, and made things fall back cleaner to a 'safe' state.

Nao

  • Dadman with a boy
  • Posts: 16,080
Re: Fixed SMF bugs
« Reply #38, on March 2nd, 2012, 01:45 PM »
Quote from Arantor on March 2nd, 2012, 10:38 AM
Well, setting a max is good because it prevents the textboxes being huge (otherwise they're long enough to easily fit a 32 bit int), and I just figured 400 was a sane size for a *thumbnail*.
Err, just help me here... I thought thumbnails were what Wedge would show below posts -- i.e. what is capped to 640x480 on Wedge.org right now. I thought there was nothing else..?
Wedge caps normal image size to 1280x1024 but it never works, they're always capped in 640x480. Does it mean I did it the other way around? That there's a setting I didn't find in the admin area, where I can set them to 1280x1024 and then a thumbnail size of 400x400 which, in this case, is perfectly allowable...?
Quote
Quote
Speaking of which, how about setting 'int' to have a 'min' of 0 by default? You've already set it to 0 pretty much everywhere, really...
I actually didn't want to set a blanket default but it's probably for the best.
It would be, I think.
Maybe it's a bad idea, but if you search for array('int', -- it will always return values that shouldn't be < 0. Well, didn't look through all of them, but it looks like it. Generally speaking, SMF never asked an admin to set a value of -1 to disable something or whatever -- always zero.
Posted: March 2nd, 2012, 01:41 PM

Oh, a possible bug...?
Manage Attachments > Prune > Prune avatars for members who haven't logged in over X days
Enter a number, press the button.

"Unable to verify referring url. Please go back and try again."

Always says that...
Posted: March 2nd, 2012, 01:44 PM

Actually says the rest on other options, too.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Fixed SMF bugs
« Reply #39, on March 2nd, 2012, 01:48 PM »
Quote
I thought thumbnails were what Wedge would show below posts -- i.e. what is capped to 640x480 on Wedge.org right now. I thought there was nothing else..?
They are - to a point. If the image size is smaller than the thumbnail size, it will display the image unresized. Now, if no thumbnail size is set, it will just show the image full size... (that's what's happening here)
Quote
Generally speaking, SMF never asked an admin to set a value of -1 to disable something or whatever -- always zero.
Makes sense, I guess...
Quote
"Unable to verify referring url. Please go back and try again."

Always says that...
Lemme guess, there's a broken image somewhere on the page? (I've noticed this before: where even 404s are pushed to Wedge for handling, it screws up the referer, 404s need to not be logged in writeLog())
The date parameter is not passed between pages properly, causing page 2+ not to filter by date.
Posted: March 2nd, 2012, 10:56 AM

I can reproduce this on SMF but I apparently can't reproduce this on Wedge even though the code hasn't apparently changed.
Posted: March 2nd, 2012, 01:26 PM

Eh, no, I can reproduce it. Just didn't see what I expected to see to start with. >_<
Posted: March 2nd, 2012, 01:32 PM

Fixed in r1419.

Nao

  • Dadman with a boy
  • Posts: 16,080
Re: Fixed SMF bugs
« Reply #41, on March 2nd, 2012, 06:02 PM »
Quote from Arantor on March 2nd, 2012, 01:48 PM
They are - to a point. If the image size is smaller than the thumbnail size, it will display the image unresized. Now, if no thumbnail size is set, it will just show the image full size... (that's what's happening here)
It's not full size here, it's at 640x480... Which is precisely the setting I'd like to modify. Having to use the media gallery when you just want to post a quick attachment isn't so cool.
Quote
Quote
Generally speaking, SMF never asked an admin to set a value of -1 to disable something or whatever -- always zero.
Makes sense, I guess...
Definitely, but we'll need to check every entry, just to be sure...
Quote
Lemme guess, there's a broken image somewhere on the page?
I don't think so?
Quote
(I've noticed this before: where even 404s are pushed to Wedge for handling, it screws up the referer, 404s need to not be logged in writeLog())
Well, they need to be if you want the admin to be able to fix the 404 in the first place...?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Fixed SMF bugs
« Reply #42, on March 2nd, 2012, 06:07 PM »
Quote
It's not full size here, it's at 640x480... Which is precisely the setting I'd like to modify. Having to use the media gallery when you just want to post a quick attachment isn't so cool.
Nope. http://wedge.org/pub/plugins/7122/a-project-i-started-a-while-back/ disagrees with you: the original image was larger than 640 wide, so it was rescaled to cap at 640px, but there's no thumbnail for it - that image shown under the post is 640x501, and downloading it also gives you a 640x501 image.
Quote
I don't think so?
Well, I know that Weaving reports 3 missing images on the page for me, which fouls it up.
Quote
Well, they need to be if you want the admin to be able to fix the 404 in the first place...?
I have no issue with the htaccess pushing 404s to index.php, but they must not be logged in writeLog(), because that pushes it into the online log, which is where the referrer is tracked as far as checkSession('post', 'admin') is concerned (which is what's causing the problem)

Nao

  • Dadman with a boy
  • Posts: 16,080
Re: Fixed SMF bugs
« Reply #43, on March 2nd, 2012, 06:24 PM »
Quote from Arantor on March 2nd, 2012, 06:07 PM
Quote
It's not full size here, it's at 640x480... Which is precisely the setting I'd like to modify. Having to use the media gallery when you just want to post a quick attachment isn't so cool.
Nope. http://wedge.org/pub/plugins/7122/a-project-i-started-a-while-back/ disagrees with you: the original image was larger than 640 wide, so it was rescaled to cap at 640px, but there's no thumbnail for it - that image shown under the post is 640x501, and downloading it also gives you a 640x501 image.
But the thumbnail settings in Wedge.org are 1280x1024. Where does the 640 value come from, then..?
Quote
Well, I know that Weaving reports 3 missing images on the page for me, which fouls it up.
That's because I haven't committed them, as I said :P
You can download them off the demo site if you want. They're there, you just need to upload them to the folders they belong to. I know, it's a hassle, but I have yet to update the site with the new tentative logos ;)
Quote
I have no issue with the htaccess pushing 404s to index.php, but they must not be logged in writeLog(), because that pushes it into the online log, which is where the referrer is tracked as far as checkSession('post', 'admin') is concerned (which is what's causing the problem)
I posted a bug fix while tracking this error, something I'd long wanted to do, but I'm not sure how we can do both -- logging 404's and not logging them for checkSession use.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Fixed SMF bugs
« Reply #44, on March 2nd, 2012, 06:46 PM »
Quote
But the thumbnail settings in Wedge.org are 1280x1024. Where does the 640 value come from, then..?
Maximum uploaded image size.
Quote
logging 404's and not logging them for checkSession use.
How do we know to log it? If we know to log it, we know to define WEDGE_NO_LOG so that it won't be logged in the online log.