Skip to main content

David Mead

Theming Known, overriding Bootstrap and base styles.

1 min read

While the blog isn't 100% where I want it (Wordpress imports and Instagram imports not working yet), I thought I'd start giving a theme a go.

Before I dove in with posts etc., there was some internal housekeeping I want to tidy up.  Namely, the settings and configuration pages.

The 'tabs' always seemed off.  Applying my go to .red class (border: 1px solid red!important;) to identify things, I could see why.

(screenshot) overlapping tabs with a red border

Time to start plugging away at some Bootstrap overrides.

David Mead

And you can see by recent trials & tribulations, https://davidjohnmead.com/2019/01/04/setting-up-a-blog-using-known-part-1 even using Wordpress is a complete pain-in-the-arse and failed me completely.

David Mead

Setting up a blog, using Known, part 3

4 min read

Time to get a WordPress instance back up and running. Piece of cake as I backed up and exported everything, right? That way links don’t stay broken and I can just start using the Known blog (on the root) going forward.

Day Three

Even though I had removed everything of my existing WP install by FTPing into the server, using Coda, I went in through the Media Temple control panel and removed the WP install there too.

While in the 1-click-apps screen I then added a new version of Wordpress in /blog.

That set up just fine. In my browser I went to http://davidjohnmead.com/blog - Lo and behold a brand new WP site. Created a user and went about importing the WP created .XML export file…and waited.

The WordPress Export

I’ve been blogging for a while now, and have imported various other blogs into this one; Blogger, Tumblr, Known, and older WP blogs since 2005. When it finished I was presented by a HUGE page informing me of all the things that didn’t get created or failed!

This was worrying.  I did notice the first block were all referencing Post Kinds.  Now, this is an IndieWeb plugin that worked well, but I hadn’t reinstalled it. That must be the problem. So I went, installed the plugin and ran the importer again.

This time I no Post Kinds errors, but still a huge page (over 6000 lines) with a lot of 'Failed to import media', 'Post “blah blah” already exists', and...

“Warning: mysqli_real_escape_string() expects parameter 2 to be string, object given in /blah/blah/blah/blah/blah/blah/davidjohnmead.com/html/blog/wp-includes/wp-db.php on line 1102”

Now posts already existing does make sense as this was the second time I’d tried this. The bigger issue was when I went to look at the blog there were no posts after September 2016! Over two years of photos, checkins, and writing gone.

Opening the file on my local machine, and checking the file size, I noticed that it was way smaller than zipped versions of previous exports. Hitting the end of the XML I saw this at line 475098…

<b>Fatal error</b>:  Out of memory (allocated 242221056) (tried to allocate 130968 bytes) in <b>/nfs/c03/h05/mnt/56448/domains/davidjohnmead.com/html/blog/wp-includes/taxonomy.php</b> on line <b>1398</b><br />

OMG! When WP ran and built the export it failed and I never saw any notification of that.

So not only am I missing the last two years, none of the 4.5k entries that are there have media that were part of the posts.

The SQL Export

Time for ‘Plan B’ - The diligent exports from mySQL I make every so often.

After asking someone who knows (Thanks GWG), I logged into myPHPAdmin and started to import the .sql file into the new WP created database.

And waited.

And waited.

And it failed. Too big. This is a nearly 60Mb file, but the upload cap it set to 10Mb.

Now comes the searching for help documentation, the cries for help on IRC, and me gingerly typing things into Terminal that I don’t understand in the hopes I can move 60Mb of SQL to the right database using SSH.

Not my fun idea of a weekend, but looking the bright side I’ve already got 4 spam comments on the WP blog less than a day of putting it back up.

Issues

  • importing WP content into Known still doesn’t work
  • posting from Teacup still doesn’t work
  • checkins from OwnYourSwarm still need to be resent from within the tool don't appear on blog
  • Importing WP content into WP didn’t fully work
  • SQL file to big to import through web

David Mead

Setting up a blog, using Known, part 2

3 min read

So after part 1, we head into day two of setting up the new blog. I currently have:

  • A new Known blog at my domain root with the last 10 Instagram posts pulled in via OwnYourGram
  • No old WP blog
  • No old blog content
  • No way to syndicate to Twitter
  • No way to pull in comments from Instagram

I had logged into GitHub and filed a couple of issues about plugins and import not working.

Chatting on the IndieWeb IRC channels (a great resource btw) it became apparent that the build on the WithKnown website is out-of-date. Marcus Povey, one of the project contributors, hosts up-to-date builds if you're not familiar with using GitHub.

Also chatted about the Brid.gy profile issue. Thinking was using the new build would clear it up. Barring that, use the profile URL for both OwnYourGram & Brid.gy

Armed with this we try again.

Day Two

  • download build 0.9.9-a from Marcus
  • deleted everything except .htaccess, config.ini, and the Uploads folder using Coda
  • unzipped and moved everything from mapkyca-known-0.9.9-a-2018112001 over to root, except the Uploads folder
  • visited site and all the content seems to still be there from yesterday
  • the IndiePub tab is a nice addition to see what you’ve connected - revoked all so I can revalidate with new build
  • activated twitter+bridgy on the Interactions tab, though I don't remember seeing anything that said it worked
  • signed in and authorized:
    • Quill
    • Teacup
    • Aperture
    • OwnYourSwarm
    • Brid.gy for Instagram (no longer asks for profile page)
    • Brid.gy for Twitter
  • added Twitter plugin (which now worked) - I had an existing app with Twitter from last time I used Known (2015), so edited that and connected
  • created a post on the blog, syndicated to Twitter - Showed up on Twitter, and a "like" from Twitter showed up on my site
  • created post in Quill and it showed up on blog
  • added feeds to Aperture - showed up in Together (feedreader), liked a post and it showed up as an entry on my blog and Twitter
  • created a post on Teacup still did not appear on blog
  • added Listen plugin
  • added Short Profile plugin - works, but most icons don’t now show up in 0.9.9-a where they did in the out-of-date build
  • added KnownEmoji plugin
  • added FooterJS plugin - This is no longer in main build, but does let you insert code into the header & footer of pages, fixing my Aperture link issue
  • tried importing the WP .XML export with the new build

Issues

  • importing WP content still doesn’t work
  • posting from Teacup still doesn’t work
  • checkins from OwnYourSwarm still need to be resent from within the tool

So we’re cutting down on the immediate issues, but still big hurdles.

Consensus is the WP importer still doesn’t work, so I’m going to add my WP blog back on /blog, using the exported .XML to return all my content.  That way I’ll have it there at least, links won’t remain broken, and everything new will be on the Known blog going forward.

Day three, here we come.

David Mead

Setting up a blog, using Known, part 1

4 min read

Yes, there are multiple parts. Wordpress (WP), Known, and myself all contribute to this, so I wanted to jot down the steps in the order I took them for anyone going about moving a blog or starting afresh.

Ready? Here goes...

Day One

Before deleting/installing/moving anything I:

  • made a note of the existing URL structure I had on my existing WP blog (domain/blog/year/month/day/slug) so I can do redirects later on if needed
  • made a note of my database details, including login information
  • exported all current mySQL databases
  • used the export tool within WP to make a copy, so I can import it later if anything goes wrong and I have to reinstall WP (more on that later)
  • moved everything I had on my local machine to a separate folder for reference (.htaccess file, custom CSS, etc.)

Feeling fairly secure I had everything I proceeded.

  1. deleted everything from root using Coda
  2. deleted old mySQL databases using myPHPadmin control panel
  3. created new MySQL database using myPHPadmin control panel
  4. downloaded Known from http://withknown.com (DO NOT DO THIS)
  5. unzipped and moved files to root using Coda
  6. browsed to my domain and followed the simple setup instructions
    Apache mod_rewrite only requirement not wholly met (screenshot)
  7. enabled all the plugins that came with the install
  8. added Short Profile plugin
  9. imported Wordpress generated XML file
  10. edited .htaccess file with redirects for https

 WordPress import started confirmation message (screenshot)

While I was waiting to get the email that the import had finished, I started going around and updating social profiles with the new URL. As I use some IndieWeb tools to syndicate my content (pull in Instagram posts, social media comments, etc.), I want to make sure they all pointed to the right place.

So I changed everything from http://davidjohnmead.com/blog to http://davidjohnmead.com. I can now use this domain to log into various IndieWeb services.

  1. signed into Quill (online tool for posting)
  2. signed into Aperture (feedreader)
  3. signed into OwnYourGram (pulls your Instagram posts into your site)
  4. signed into OwnYourSwarm (pulls your Swarm checkins into your site)
  5. signed into Teacup (replacement for Foodspotting)
  6. signed into Brid.gy (pulls comments from various social media into your blog)

When I went to test these I started running into issues.

Issues

Aperture creates a <link> for you to add to the <head> of your HTML pages.

<link rel="microsub" href="https://aperture.p3k.io/microsub/xxx">

There didn't seem to be a way to add this within the Known settings. I also didn't know which file I could edit to manually add it using FTP.

The Brid.gy login for Instagram wanted my blog's profile URL (https://davidjohnmead.com/profile/davidmead) to be in my Instagram profile, but OwnYourGram was fine with the root being in there.

Teacup would let me login, create a post, but it never showed up on my blog.

OwnYourSwarm captured checkins, but only sent them to my blog if I logged in and imported them again.

I needed a way to send my blog posts and replies to Twitter, so I found the Known plugin on GitHub and installed it, but it broke.

After all this I still didn't receive any notification that the Wordpress XML import had worked.

So at the end of the day I had:

  • A new Known blog at my domain root with the last 10 Instagram posts pulled in via OwnYourGram
  • No old WP blog
  • No old blog content
  • No way to syndicate to Twitter
  • No way to pull in comments from Instagram

Not terrible, but not where I wanted to be. On to day two.

David Mead

Lost last 2 years blog content!

1 min read

Trying to import back into WordPress and I'm missing last 2 years of entries. Looking at the .XML export file WP generated I see the following...

"<b>Fatal error</b>:  Out of memory (allocated 242221056) (tried to allocate 130968 bytes) in <b>/nfs/c03/h05/mnt/56448/domains/davidjohnmead.com/html/blog/wp-includes/taxonomy.php</b> on line <b>1398</b><br />"

 Would've been great to know that when I ran the export, before wiping out the blog from the server.

Also, it seems none of the media came across or could be imported either.

This is not going well.

David Mead

Moving from WordPress to Known

1 min read

With WordPress moving over to Gutenberg recently (the new editor literally not working for me), and the continual bloat from installing more and more plugins, I thought it might be time to try a different blogging platform.

Known is a "publishing platform for everyone" that been around for a few years now.  I first tried it 4-5 years ago, and it worked pretty well, but it had some development kninks to work out.

The move has not been without it problems, not least being unable to import all of my content from WordPress, so I'm going to do a couple of posts outlining the process, fixes, and issues I've run into.