Can't get Shortcodes to work anywhere

Tried shortcodes in metadata fields of an item as well as in simple pages with both HTML turned on and turned off and I just can't get them to work.

Just updated to 2.2.2. Is there something in settings or theme I need to be aware of?

What version of Simple Pages are you using? The one bundled with 2.2 and up will support shortcodes, but if you kept your old version instead you'd have this problem.

I'm using Simple Pages 3.0.1

That version should work fine.

What kind of page text are you trying that doesn't work, and what's the wrong output you're getting?

Do you have a custom simple-pages/page/show.php in your theme? I had the same problem, and that was the culprit. If you do, make sure that instead of just echoing $text, you're echoing $this->shortcodes($text).

Sheepeeh's suggestion seems likely -- I've encountered that being the problem, too.

Plus, I'm pretty sure that shortcodes won't work in metadata fields, just the simple pages.

Also, following on what John asks, if you are trying the [carousel] shortcode, that calls for the separate ShortcodesCarousel plugin.

sheepeeh was spot on. That fixed my problem. Thanks!!!

Maybe that could make it somewhere into documentation either for user or for developers?

Also, do you think you'd ever make shortcodes available within metadata fields? Could be very useful for adding images as descriptive metadata.

We'll look into if/where it might fit into the documentation.

Personally, I'm torn about / hesitant to add shortcodes to metadata fields. It would sorta make items themselves metadata about .... other items? (or item could easily appear as metadata about itself, which might produce a singularity, or at least metadata-ception). I fear it would be too easy to create confusion.

That said, conceptually at least I can see the rare case where it might sorta make sense. For example, in the Dublin Core Related field. I think that'd be better handled by a small customization to the theme files that'd invoke a shortcode separate from the metadata, though, rather than opening the possibility of oddities like a carousel being in the Dublin Core Title field, for example.

Totally understand the data/metadata conundrum. Just to show you the example we are doing it with, it is on this site (this is an interview within the site): http://www.bgccraftartdesign.org/items/show/1

We are using the site for oral history transcripts, but we like to add contextual images to the transcripts as you'll see. Being able to use the shortcodes to add image files (and even pull their own metadata) would be a great enhancement rather than having to do HTML workarounds.

Ah! I see what you mean, and is an interesting use case. Do I follow right that you've got the long Transcript field, and want to pull in specific items relevant to that moment in the conversation? Or is the transcript not in a field, but somehow otherwise added to the item show?

That looks right on the tricky line between metadata purity and good presentation for the web that we try to ride.

Sheepeeh's fix might offer some possibilities for the direction you are thinking of. $this->shortcodes($text) will just replace all of the shortcodes in whatever $text is. So, regardless of whether that transcript is in a Transcript field, or in a pile of directly written HTML, if you can pull that out into a $text variable separately, and put the shortcodes in where you are now doing HTML workarounds, then push all that through $this->shortcodes($text), that might be the balance we're talking about.

I anticipate continued HTML trickery, even in that approach, to at least wrap the content from the shortcodes appropriately. The captions you are producing are another thing. I don't think existing shortcodes could pull that automatically (say, from Description or another field), but movement toward that is possible.

While I can see why you would want each transcript to be an item, to me it would make more sense to have the item itself include plain-text, but then create an exhibit page and link to it from the item page as "View this transcript in context." Then you could use several file-text blocks to achieve the desired effect, all without making any changes to the way Omeka handles metadata.

Or, you could do the same with a Simple Page. But this presentation strikes me as being very exhibit-like.