Manual teaser breaks vs. "Filtered HTML" text format

Posted on: Wed, 05 Dec 2018 16:54 By: patrick

Placing the following line inside a Drupal story node's body (I guess it also works for other content types) adds a manual teaser break:

<!--break-->

This works fine when the story uses the "Full HTML" text format. It stops working, however, when the story's text format is switched to "Filtered HTML" - in that case Drupal simply ignores the manual teaser break and auto-breaks wherever it sees fit.

For Drupal 7, a bug report was submitted 8 long years ago, and the issue is still open today. I can only imagine that they didn't fix it because a workaround exists: A site admin can add <!--> to the "Filtered HTML" text format's set of allowed HTML tags.

In Drupal 8 this workaround is no longer available because in Drupal 8 the "Filtered HTML" text format unconditionally filters out all HTML comments. A few days ago I submitted another bug report on drupal.org for Drupal 8, and today I decided that I'm really not in the mood for going through all my old stories and switch those with manual teaser breaks to "Full HTML". Instead I wrote a patch that fixes the issue and that is now live on this site. If you're interested you can find the patch in the bug report referenced above.

Migrating from iPhoto to digikam

Posted on: Wed, 28 Nov 2018 19:22 By: patrick

This is a longish story about how I migrated my photo library from Apple's discontinued iPhoto application to the open source program digikam (version 5.9.0 beta from March 2018). If you follow a similar migration path and make the same decisions as I did on what data to keep and what data to discard, then I hope you will find a reusable solution in this story. These are the pieces:

  • An AppleScript for the initial iPhoto export
  • A shell script for post-processing and preparing the exported data for the digikam import
  • The instructions how to configure digikam to make the import work
  • Optional cleanup work and sync'ing back of metadata to image files

A warning before you dig in: Although I have tried to explain everything in as much detail as I could, you should prepare yourselves for surprises and an arduous migration - it certainly was for me.

Article Styles

Two bugs found in Drupal 8 Core

Posted on: Wed, 17 Oct 2018 11:31 By: patrick

In the previous Drupal 8 site upgrade story, I mentioned that the link field type does not correctly render URLs with certain query strings. Example: http://www.isfdb.org/cgi-bin/title.cgi?1580 is rendered incorrectly as http://www.isfdb.org/cgi-bin/title.cgi?0=.

When I didn't receive any satisfactory answers to my plea for help on the StackExchange site "Drupal Answers", I decided to go bug hunting myself. The result: I found two bugs deep inside Drupal 8 Core! For the first bug I have submitted a new Drupal Core issue (issue 3007243). For the second bug I have contributed my analysis to the discussions of two existing Drupal Core issues (issue 2987114 and issue 1464244).

If you're interested you can hit the "Read more" button to find my detailed analysis. It's the same text that I wrote as answer on "Drupal Answers", but I'm reproducing it here to give my site a little bit more content 😀

Topics

Site upgraded to Drupal 8

Posted on: Wed, 03 Oct 2018 21:19 By: patrick

After two weeks of work I have more or less completed the upgrade of this website from Drupal 7 (D7) to Drupal 8 (D8). Also part of the package is a new theme (the "Nexus" theme) because the old Drupal core theme "Garland" has not been ported over to D8. I'm not as happy with the new theme as I was with "Garland" (for instance, check out how ugly the "Add new comment" form looks like), but for the most part it's quite OK.

Little Go 1.3.1 released, and another Ko bug squashed

Posted on: Sun, 22 Jan 2017 15:27 By: patrick

Little Go 1.3.1 has been published a couple of days ago on the App Store. This release contains a single bugfix only - but one that I consider to be very important!

There's more to read after the break. The App Store update notes and the GitHub release page both have a shorter text.

Software Projects
Article Styles

Little Go 1.3.0 released

Posted on: Wed, 14 Sep 2016 11:16 By: patrick

Little Go 1.3.0 has just been published on the App Store. This is a technical and bugfix release whose focus is on updating the project to the iOS 9.3 SDK, and on fixing an evil ko detection bug that might have been responsible for many bug reports that I have received due to the infamous "The computer played an illegal move." alert. Many thanks to Denis Martynov for helping me with identifying this bug. I promised to release the bugfix

[...] as soon as possible, probably next weekend.

This was in June 2015 - over a year ago :-(

To find out about the changes that are in the release, either read the App Store update notes or hop over to the GitHub release page to see the changelog.

Software Projects
Article Styles

How to hide Fabric API key and build secret in an Open Source project

Posted on: Tue, 23 Aug 2016 04:07 By: patrick

A mobile app that integrates the Fabric mobile platform and the Crashlytics crash reporting framework requires two things to successfully communicate with the Fabric / Crashlytics server platform:

  • The Fabric API key: This is required at build time so that the build process can upload the debug symbols that later are required to symbolicate crash reports. The API key is also required at runtime so that the app on a customer device can submit crash reports.
  • The Fabric build secret: This is also required for uploading debug symbols at build time.

Whoever knows these two pieces of information can freely interact with the Fabric / Crashlytics server platform on behalf of the app, so obviously you want to restrict knowledge of the information to people who can be trusted. This article shows how to keep API key and build secret private even in an Open Source project like Little Go where, by definition, there is the desire to publish everything.

Article Styles
Topics

The Art of Computer Programming

Posted on: Mon, 15 Aug 2016 16:23 By: patrick

Here's a line of code that I recently sighted when I had to dig through ancient Excel VBA cruft at work:

Falsch = True

For German speakers: The code works because it uses a non-keyword (Falsch) as the variable name. For non-German speakers: "falsch" is German for "false", so the original code can be translated to:

False = True

After a moment of disbelief, I couldn't help but admire the amount of badness that is compressed into this single line of code - there is even a philosophical statement here! It's so fabulous that I consider it to be a real piece of computer programming art!

Article Styles

Between journey 1 and 2: Power Play

Posted on: Wed, 26 Aug 2015 13:23 By: patrick

As recounted in the description of my first exploration journey, I had travelled in a decently equipped Asp Explorer. For the next journey, though, I wanted to improve some of the modules, most importantly I wanted a class A frame shift drive so that I would be able to make longer hyperspace jumps. To earn the necessary credits, I decided to check out how Power Play works.

Subscribe to