Its a minor bug and you already sort of describe it in your code when writing there should be a better way to get the content type. In the form you are doing it now you didnt include content types with underscores. Say for example: content_type in the url will be content-type. A simple str_replace could be a solution.

$type = arg(3);
$type = str_replace('-', '_', $type);

But maybe there is a better way.

Comments

joelstein’s picture

Good catch! Fixed in the latest release.

joelstein’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.