« first day (1208 days earlier)      last day (4035 days later) » 

00:03
@Rarst You got a job now? Where?
 
3 hours later…
02:34
sup
question
i had an upgrade forced on me (yay) and now, ?page=1 requests get transformed into /1/ ...
how the hell do i stop that from happening
sounds like you need to go to Settings->Permalinks and change it back to post_id or whatever
well, the permalinks have always been set to post_name
even on UAT
it appears the behaviour has changed somewhere
plugin? still, revising permalinks page will often rebuild htaccess
unless something has happened which prevents htaccess from working or being writeable
hmm
ill chat to the sysadmin
can you view/edit .htaccess?
02:41
not atm
not on production
my money is still on the upgrade introducing something in wp that's changed the URL buildng.
i've always used /post-name/ so couldn't say - only thing i can think of is maybe the "default" being changed to pretty urls, but haven't heard of it
the double whammy of having a post type called "page", and it being used in pagination
hehe. yea there are some post_type names to avoid
didnt seem to be a problem on the previous version
i wasnt informed of the upgrade until the eventual "hey this doesnt work" email
sigh
saw you are in brisbane, you ever hear of Sennza
02:45
nope
im in a digital agency, for the next few weeks at least. but never heard of them.
alright. lunchtime :) i've recommended we just rename the post variable
might be a problem on other sites too
thanks for the help
np goodluck
 
5 hours later…
07:21
is there any way to choose what columns WP should select when using WP_Query? say I only want ID and post_title not every column values..
i see.. I wish there was a filter for that..
Yeah, looks like the only other option is to return just the post IDs. You could then use get_the_title on each ID.
08:31
picked up some WooCommerce work, #loopchat will disown me...
@Rarst get out, and you have nerve to show your face here?
well... I do own the room :)
@Rarst was that a threat?
yes?
WooRarst...
7
08:42
:) I need my tea before @kaiser wakes up and sees that...
@Rarst if you have any questions about WooCommerce plugin, ask them on main site.
naturally, where else?
WooCommerce is now first priority in our scope
@Rarst I want to devote all of my time helping their customers for free while they make a lot of money.
08:58
that's the spirit
 
2 hours later…
10:46
@Rarst ...
don't look at me like that! something got to pay for my WordCamp addiction!
sounds more like a disease now
Anyway, we always were lacking an expert in Woo. Finally we got one and it's Rarst! (who can takeover whole queue).
nope
11:02
If you stay with nope, I shall open a Meta question polling if people want you to adopt that tag.
11:55
I wouldn't have thought that someone with a generic user name, no avatar or profile information would write close to 800 answers.
@kaiser someone who truly cares not for recognition...
Seems like the account is inactive :)
@kaiser he must be an undercover ninja!
how do implement conception of A ∪ B using php array?
nvm
@Sisir what you trying to do?
12:12
I was trying to find union of two array values. Sounds like array_unique(array_merge($arr1, $arr2)) does the job
is that bigcup? or union?
sorry posted msg timed out
 
4 hours later…
16:17
Sotchi Tweets from journalists. :D
17:04
I would have stayed on one of the many cruise boats in the port
at least you know they work
I'm a nub at regex, Is there a way to strip all HTML meta tags, in combination with this: preg_replace('/^<!DOCTYPE.+?>/' in the same line?
@MichaelEcklund try an online regex debugger like regex101.com or debuggex.com
Thanks for the links
@MichaelEcklund try '~<!DOCTYPE.+?>|<meta[^>]*>~'
17:23
@toscho Perfect. Did the trick.
Thanks
Now I can return my HTML from DOM as a fragment. As seen here but he didn't remove <head></head> and <meta.
    $html = preg_replace(
        '~<!DOCTYPE.+?>|<meta[^>]*>~',
        '',
        str_replace(
            array(
                '<html>',
                '</html>',
                '<body>',
                '</body>',
                '<head>',
                '</head>'
            ),
            array('', '', '', '', '', ''),
            $dom->saveHTML()
        )
    );
uhm, that’s not ideal
$html = stripslashes( $post_data[ 'post_content' ] );
$doc  = new DOMDocument( '1.0', 'utf-8' );
$doc->loadHTML(
	// encoding to enforce UTF-8, the table to prevent additional markup
	'<?xml encoding="UTF-8"><table><tr><td>'
	. $html
	. '</td></tr></table>'
);
$xpath    = new DOMXPath( $doc );
// change the content, then:

$body = $doc->saveHTML( $doc->getElementsByTagName( 'td' )->item( 0 ) );
18:09
@toscho I haven't learned xpath yet
screw xpath so much. :) DomCrawler ftw
me too. didn’t stop me.
I spent all day yesterday figuring out how to manipulate my HTML using nodes. It would be super easy to just manipulate and instantly output, but I'm manipulating, and storing so that it can possibly be manipulated again before finally ready for output.
Symfony has only been around since '05? Took me until '13 to even hear about it.
Is this a decent beginners scraper class?
DomCrawler
wasn't that big enough hint? :)
18:18
DomCrawler
Everything on Symfony just looks super complex
you are looking at it wrong. don't go looking at framework, go look at individual components you need.
Yeah but don't you needs to know the basics about that framework in order to use it's components?
Symfony is more a library than a framework
no, no, no. all components just work by themselves.
It looks pretty easy to use.
yay, it's sinking in... :)
@kaiser 2.0 is old
better :)
18:36
already corrected :)
18:50
What shell do you Windows devs use for git and other CLI tools? CMD, Powershell, Cygwin shells, etc?
Mostly out of curiosity, but also because I'm done with writing whack-$%* batch scripts.
Git/GNU Bash
cmd
Powershell isn't too bad either as it can be turned to fullscreen has auto horizontal scrolling, etc.
But most bash scripts don't work there, font/readability sucks, etc.
cmd is for DOS nerds Rarst
@kaiser I just discovered the Powershell ISE - Microsoft apparently finally decided that usability isn't a passing fad. I used to be all for cmd, but lately I've been running into all sorts of weird crap with my $PATH. Sometimes I'd have access to git and other tools, sometimes I inexplicably wouldn't.
well. my problem currently seems to narrow down to node.js having a wrong Reg entry. Reinstall didn't fix that. Grunt unable to find Gruntfile.js in a folder and bower doesn't recognize git/has ERNOGIT. Powershell makes bower magically work, but the problem with grunt remains.
19:01
I use mobaxterm on win7 but it sucks on win8
don't remember why I dropped mobaxterm on win7...
maybe because the name sucks :D
lol
node.js CLI is ok too. same goes for CLI that ships with ruby.
@Wyck I used mobaxterm for a while, but it felt too heavy for a term-emu to me. Might have to revisit it, though. Currently using ConEmu as my actual interface.
ah yeah, there's one thing that sucks with Node.js/Ruby/Git bash/CLI: You have a very limited history. So if you're dumping/logging your commits for e.g. you mostly don't see the whole history.
19:06
@kaiser I ran into a bunch of nonsense like that, and ended up pre-loading a batch script into every cmd instance via some reg-key in order to actually properly set up my $PATH and all of my aliases, initialize utilities, etc. But the batch has become unmanageable.
ya I cant use it on this machine, it's annoying, I use powershell when I have too
@kaiser not a fan of the PHP CLI though?
php cli...?
on second though, not the same(?). Never actually played with writing too many CLI PHP scripts - not all that sure about the capabilities. I may be confused
PHP scripts run in normal console. there is whacky console interpreter in PHP but no one really uses it
19:12
My ~/Users/my-name/.bashrc that makes the CLI suck less.
@Rarst wasn't there even a php.net site for that one? need to look that up.
that one what?
php CLI somewhat something
nope. confused that with PHP built in server that I just found out about.
PHP 5.4 has a built in local server: php -S localhost:8000 - Details: http://www.php.net/manual/en/features.commandline.webserver.php
aaaaand
Windows and PATH... POWERSHELL! for the rescue. Still some npm stuff doesn't recognize git or main files. Aaargh! 2 days lost!
@Rarst ah, that one. I wouldn't name it CLI, but still :)
@Rarst ah-hah! I knew I wasn't (entirely) crazy!
 
3 hours later…
22:44
Anyone have trouble updating multi-site?
The initial upgrade to 3.8.1 was fine, but then when I click "Upgrade Network" ... my connection eventually just times out.
Never used to do that.
"Your server may not be able to connect to sites running on it. Error message: Operation timed out after 120000 milliseconds with 0 bytes received"

« first day (1208 days earlier)      last day (4035 days later) »