Loading...
 
Skip to main content

If you don't have one keywords set on the admin, metatags no Tiki Tags is set as keyword even if they exist

Status
Open
Subject
If you don't have one keywords set on the admin, metatags no Tiki Tags is set as keyword even if they exist
Version
29.x
30.x
master
Category
  • Bug
  • Easy for Newbie Dev
Feature
Administration
Meta Tag
Tags
Resolution status
Confirmed
Submitted by
Bernard Sfez / Tiki Specialist
Volunteered to solve
Espoir Baraka
Lastmod by
Bernard Sfez / Tiki Specialist
Rating
(0)
Description

I'm on Tiki Wiki 29 I enabled the Tiki Tags feature.
I'm using some tags on wiki page and I have set some tags.
But the keyword tags are not displayed in the head.

I went at tiki-admin.php?page=metatags (admin metatags).
I checked that "Include tags" is enabled. But I have also noticed I no Keywords set in the field Keywords.

As result I have no keyword on the page.
If I add just one keyword in the field, on the page i see this keyword but also all other missing keywords.

The condition for the elseif branch only triggers if either metatag_keywords or metatag_local_keywords is non-empty.

NOTE: I don't use forum so I didn't touch anything related to the way the forum fill its keywords. It may worth to have a look at it.

Solution

I fixed and added the "Include tags" in the condition. (at least for me)

Looking at the current code, there are actually two problems:

1. The elseif condition doesn't account for tags at all.
2. Inside the block, the tags inclusion checks $prefs.feature_freetags eq 'y' but never checks $prefs.metatag_freetags eq 'y' (is "Include tags")

I fixed with this (from line 14 to line 18)

Copy to clipboard
{if !empty($forum_info.name) & $prefs.metatag_threadtitle eq 'y'} <meta name="keywords" content="{tr}Forum{/tr} {$forum_info.name|escape} {$thread_info.title|escape} {if $prefs.metatag_freetags eq 'y' and isset($tags)}{foreach from=$tags item=taginfo}{$taginfo.tag|escape} {/foreach}{/if}"> {elseif $prefs.metatag_keywords neq '' or !empty($metatag_local_keywords) or ($prefs.metatag_freetags eq 'y' and !empty($tags))} <meta name="keywords" content="{if not empty($prefs.metatag_keywords_translated)}{$prefs.metatag_keywords_translated|escape}{if $prefs.metatag_freetags eq 'y' and isset($tags)}, {/if}{elseif $prefs.metatag_keywords neq ''}{$prefs.metatag_keywords|escape}{if $prefs.metatag_freetags eq 'y' and isset($tags)}, {/if}{/if}{if $prefs.metatag_freetags eq 'y' and isset($tags)}{foreach from=$tags item="taginfo"}{$taginfo.tag|escape}, {/foreach}{/if}{$metatag_local_keywords|escape}"> {/if}
Workaround
Importance
7
Easy to solve?
10 easy
Priority
70
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8942
Reviewed by Wishlist Team On
04 Mar 26 15:09 UTC
Created
Monday 02 March, 2026 16:23:53 UTC
by Bernard Sfez / Tiki Specialist
LastModif
Thursday 18 June, 2026 14:43:26 UTC


Show PHP error messages