XMAP K2 Extension [Update]

I have switched some time ago, my own sites from Joomla to WordPress and therefore I am no longer using this extension. Since I no longer have enough time to track the further development of Joomla and K2, I have decided that I will no longer maintain this extension. If someone else will take over the maintenance I would add a redirection to his site. The download of the latest version will be available until further notice. However, there will be no new versions.

New version of my XMAP extension for K2. There is one version for Joomla 1.7 and higher (with XMAP 2.0 and K2.5) and one version for Joomla 1.5 (with XMAP 1.2 and K2 2.4). To install this extension use the extension manager of XMAP.

There are three configurable options for this extension:

  • Follow Subcategories: specify whether the sitemap should contain the contents of subcategories or not. This option has been introduced to avoid duplicate entries if a menu item is configured to show subitems and at the same time subordinate menu items directly point to these K2 items.
  • Suppress Duplicates: if option “Follow Subcategories” is enabled then the sitemap may contain duplicate entries under different menu items. By setting this option to “yes” duplicate categories and items will suppressed in the sitemap.
  • Show K2 Items: Select whether K2 items should be added to both site map types, only to XML site maps, only to HTML sitemaps or never.

K2 stores title alias names of items and categories exactly as they were entered. This id different from the behaviour of Joomla’s articles where vowels, special characters etc. are translated to ASCII values less than 128. Articles or categories with alias names containing characters with ASCII values greater than 127 will not appear in the sitemap. Therefore you should only use characters with an ASCII value < 128.
If you find any problems or have a request for enhancements please leave me a message via the feedback form.

Version 1.0 and above of this extension supports Joomla! 1.7 or higher, XMAP 2.0 and K2 Version 2.5. If you are using Joomla! 1.5 please stay with version 0.96.

Changelog

2012/11/01 1.10

Version with french translation uploaded (the translation and adaption of the plugin was done by Mihàly Marti)

2012/06/19 1.10

The URLs in the sitemap are more SEF-friendly (only for Joomla! 1.7 and higher).
Thanks to “selan90″ for his tip. 

2011/11/14 1.07
0.96
Bugfix: The option “Follow Subcategories” did not work as expected. After the installation of the plugin update please check whether the sitemap contains the expected items. If not modify this setting.
2011/11/03 1.06 Bugfix: PHP error if list of list of categories or users is empty
2011/11/02 1.05 Bugfix: menu items configured for multiple K2 categories did not work
2011/09/27 1.01 Bugfix: XML sitemap did not contain K2 items
2011/09/22 1.00 New version vor Joomla 1.7, XMAP 2.0 and K2 2.5
2011/08/13 0.95 Bugfix: problems with empty categories and sql errors in some cases
2011/01/13 0.94 Bugfix: avoid PHP warning
2010/11/28 0.93 Added support for news sitemaps
2010/10/13 0.92 Bugfix: PHP error with K2 type “Latest items from (one or more) users or categories”
2010/08/21 0.91 Bugfix: wrong SQL statement corrected
2010/08/14 0.90 The sitemap now takes the user group of the current user into account, i.e. guest will only see items with access level “Public”. The XML sitemap will only contain public items. Reported by walplanet.com.
2010/05/24 0.86 Bugfix: expired K2 items will no longer be shown in the site map
2010/04/11 0.85 New option “Suppress Duplicates” introduced.
If used together with component SEF Service Map 2 instead of XMAP the correct date format will be used.
2010/02/19 0.81 Small bugfix: “Last modify date” not set for all items
2010/02/07 0.80 Support of the new features of K2 2.2
2010/01/30 0.67 Small bugfix to avoid PHP warnings if a SQL query fails under K2 2.2.
2009/10/07 0.66 Small bugfix to avoid PHP message “PHP Notice: Undefined variable tree”.
2009/09/28 0.65 The XML site map now contains the date of the last modification instead of the current date.
2009/08/21 0.60 New option “Show K2 Items” added to configuration.
2009/08/21 0.51 Suppress deleted categories and items

XMAP K2 Extension
XMAP K2 Extension
xmap_k2_0.96.zip
Version: 0.96
4.3 KiB
5333 Downloads
Details...

XMAP K2 Extension for Joomla 2.5
XMAP K2 Extension for Joomla 2.5
plg_xmap_com_k2.zip
Version: 1.10
7.6 KiB
11732 Downloads
Details...

  • Joddie

    where’s the download link??

    • http://www.mherbst.de Martin Herbst

      It’s back again.

  • Pascal Bourhis

    Doesn’t work :
    K2 2.4.1
    XMAP 1.2.13

    XMAP K2 Extension 0.95 (installed and enabled)
    => Dont show up any items…
    url :http://tv.domodeco.fr/plan-du-site
     

    • http://www.mherbst.de Martin Herbst

      Pascal, I need some more information:
      - How is the extension configured?
      - Which of the menu items point to K2 items and how are the menu items configured?
      I had a quick look at the website and for me it looks OK. Please keep in mind that the sitemap can contain only K2 items that are reachable via menu items.

      • Pascal Bourhis

        incredible… I didn’t do anything (while i was writing you my previous post) and it works…
        oh, i did just on thing : i cleared all Joomla/K2 caches…
        There is one thing which don”t work : show external links

        • http://www.mherbst.de Martin Herbst

          :-) Sound common to me. I had several times problems because of the cache(s).
          Your problem with external seems not to be related to K2 or my extension, or am I wrong. If it is an XMAP problem you should ask in the XMAP forum.

  • Nikitov

    When you go version of K2 v2.5 (RC) for Joomla! 1.5/1.6/1.7?

    • http://www.mherbst.de Martin Herbst

      I wanted to wait until K2 2.5 is finally released but if I find some time will do some tests with 2.5 RC in the next days. 
      But the guys from Joomla Agentur already modified the package to make it installable under Joomla 1.6/1.7. You can download it from http://www.joomla-agentur.de/labor/itemlist/category/162-xmap-2x-plugin-for-k2.html

    • http://www.mherbst.de Martin Herbst

      You can now download Version 1.0 which supports Joomla 1.7

  • Temka

    Martin, I need to sort materials by title, not by id
    tell me please, can we change the source code to change order?If I understand correctly, i need to change the item “order by id” in source code?ps: thanks in advance

    • http://www.mherbst.de Martin Herbst

      You can try to change all occurrences of “order by id” into “order by title”. If this is not sufficient you should also check all select statements with “from #__k2_items”. Some of them are using “order by 1″ which can be changed into “order by 2″ e.g..

      • Temka

        Thanks, works great! I replaced the ”order by id” into “order by title” and ”order by 1 DESC” into “order by 2 ASC”. Thank you very much!

  • Datshay

    got a problem !
    with K2 2.4.1

    Sub categories are not well fetched. Sometimes shows and sometimes not…

    • http://www.mherbst.de Martin Herbst

      Hi, 

      I need some more information from you:
      - how did you configure the plugin?
      - link to your sitemap
      you can mail both information to webmaster(at)brisoft.de

  • http://twitter.com/paTon_ Cristian Fassi

    Thanks a lot for the Joomla 1.7 version of the plugin! is working great !

  • http://twitter.com/yurporada Советы юристов

    K2 v2.3 Xmap version does not work, put all the settings, cache cleaning, nothing helps, if you can answer, thanks?

    • http://www.mherbst.de Martin Herbst

      Which version did you try?Version 1.01will only work with K2 2.5. and Joomla 1.7. Version 0.95 was only tested with K2 2.4. I can’t guarantee that it will work with 2.3. So you at least update to 2.3.

  • http://www.facebook.com/luigivitale81 Luigi Vitale

    I have a problem with activation of plugin xmap_k2_0.95.zip.
    Version:
    joomla 1.5.23.
    Xmap 1.4.
    plugin 0.95.

    • http://www.mherbst.de Martin Herbst

      Hi Luigi,

      please check the Xmap version again. According to the the XMap Website there ist only Xmap 2.0 (for Joomla 1.7) and Xmap 1.2. or do mean Xmap 1.2.14?
      What kind of problem do you have? Do you get an error message?

      Martin

      • http://www.facebook.com/luigivitale81 Luigi Vitale

        thanks for help.
        Is Xmap 1.2.14.The problem: inside panel Xmap reading “extension installed” i see that “K2 plugins 0.95″ is not publish and joomla not makes me publish when i click on.

        • http://www.mherbst.de Martin Herbst

          I tried to reproduce it with XMAP 1.2.14 but it works perfectly. Maybe it is a problem of your PHP version. Which version are you using? You can set the error reporting to “Maximum” in the server configuration to see whether any PHP errors are issued.

          • http://www.facebook.com/luigivitale81 Luigi Vitale

            I have xampp 1.7.3. and PHP 5.3.1.
            I have changed value to “Maximum” but same phenomenous occurs.

          • http://www.mherbst.de Martin Herbst

            I am using the same PHP version so that can’t be the reason. I hoped that some error messages would appear with Maximum error reporting but it is strange that they do not appear. Unfortunately I don’t exactly know what XMAP does when you activate a plugin and why it could fail. 
            Did you try to open the options dialog for my K2 plugin? Does this work? I can remember am Javascript problem with XMAP that prevents this dialog from opening and maybe also the activation.

          • http://www.facebook.com/luigivitale81 Luigi Vitale

            when i open option dialog of tab Sitemap and then click ok Preferences not load nothing.

          • http://www.mherbst.de Martin Herbst

            In this case the problem could be caused by the “Mootools Upgrade” system plugin. There is a compatibility problem between XMAP and this mootools version activated by this Joomla plugin. Please deactivate the plugin and try again.

          • http://www.facebook.com/luigivitale81 Luigi Vitale

            Good Mr. Herbst i just solved. Thank you! I have deactivated the plugin and now Xmap correctly displays menù.

  • mike

    Using newest version of joomla 1.7 and k2 2.5
    Xmap K2 for joomla 1.7 only shows the categories but not the articles please help

    • http://www.mherbst.de Martin Herbst

      Mike, please checkt at first that you have installed the latest version of my extension and that it is enabled. If both is true then please tell me how you configured the extension and how the menu items pointing to the K2 categories are configured.

  • Carole

    I’m using Joomla 1.7, Xmap 2.1, and K2 2.5. I installed your extension, version 1.01 and the K2 items are not showing in the sitemap generated by xmap. I have tried clearing my cache, disabling and enabling the plugin — but still no results. Any other thoughts? My items are in a K2 subcategory, and I have chosen “follow subcategories”. I’d appreciate any help or thoughts you may have.

    • http://www.mherbst.de Martin Herbst

      Carole, please send me the address of your website.
      Martin

  • http://www.facebook.com/notaro Mario Notaro

    Hi, version 1.01 seems not to have the requested (and compulsory) tag for the google news sitemap:
    name of the site
    it

    Or is it me that I don’t configure it well?

    thx,
    Mario

    • http://www.mherbst.de Martin Herbst

      Hi Mario, to me it seems that this are general information that should be provided by XMAP and not by each extension. So I would assume that this is an XMAP problem and it may be better to ask in the XMAP forum. Or are these information only missing in K2 items?

      Martin

  • Ilham_lohan

    Doesn’t work :
    K2 2.4.1
    XMAP 1.2.14
    Can NOt Install XMAP K2 Extension 0.95
    Message:
    Warning:
    JInstaller::require_once(/home/sloki/user/h73928/sites/www.bola-id.com/www/libraries/joomla/installer/adapters/xmap_ext.php)
    [jinstaller.require-once]: failed to open stream: No such file or directory in /home/sloki/user/h73928/sites/www.bola-id.com/www/libraries/joomla/installer/installer.php on line 216

    Fatal error: JInstaller::require_once() [function.require]:
    Failed opening required
    ‘/home/sloki/user/h73928/sites/www.bola-id.com/www/libraries/joomla/installer/adapters/xmap_ext.php’
    (include_path=’.:/usr/share/php:/usr/share/pear’) in /home/sloki/user/h73928/sites/www.bola-id.com/www/libraries/joomla/installer/installer.php on line 216

    • http://www.mherbst.de Martin Herbst

      It seems that you have tried to install the XMAP extension via the Joomla plugin installer. This won’t work in Joomla 1.5. You have to use XMAP’s own installation routine to install XMAP extensions.

  • Hellomynews

    Hi

    The plug in is not able to list the articles inside subcategories of K2 category.  I have created one menu item for main category. which had 4 more sub categories. but the articles inside subcategories are not shown in the sitemap generated by xmap.

    Please help me

    Thanks in advance…

    • http://www.mherbst.de Martin Herbst

      Hi,

      did you set the option “Follow subcategories” to Yes? If you did and it did not help please give me some more information, especially which version you are using and how you have set the options of the extension.

      Martin

      • Hellomynews

        Hi

        yes i set Follow sub categories to YES.  Jooomla 1.7,  K2 2.5.1  and your latest version of plugin.

        • Hellomynews

          Hi

          Sitemap url for your reference.

          http://www.hellomynews.com/index.php?option=com_xmap&view=xml&id=1

          check Lyrics in sitemap.  it have many sub categories
          but nothing is present in sitemap.

          • http://www.mherbst.de Martin Herbst

            Maybe I found the reason for the problem. I have created a package for you to test it. You can download it from here http://dl.dropbox.com/u/2311861/plg_xmap_k2.zip. Please tell me if it helps. 

          • Hellomynews

            Hi Martin,

            Thank you for your help. Its now listing subcategory articles. I installed your new plugin provided in comments.

            But still i have some problem with this plug in or xmap..i dont know…

            Its showing different format urls in format.

            Site url: http://www.hellomynews.com/india/item/62-2-g-scam-pranab-mukherjee-meets-pm

            Sitemap Url: http://www.hellomynews.com/component/k2/item/62-2-g-scam-pranab-mukherjee-meets-pm

            Please help me.

            I posted this problem in xmap forum, but no help

          • http://www.mherbst.de Martin Herbst

            First of all good to hear that it is now working correctly. So I will publish an “official” update tomorrow.

            With the other problem I think I have no chance to create an other URL. The only information that I have are category ID and item ID. I don’t know to which menu items an K2 item is connected and how to build an URL from it. Also the URL can be influenced by SEO plugins. So I build an short url and leave it to XMAP and SEO plugins to build the correct URL.
            To get the URLs in the way you want to have you can try the following: create a menu structure with submenus and then connect the K2 subcategories to the sub menu items. The sitemap is built according to the menu structure. The “Follow subcategories” option must then be set to false.

            Martin

  • http://twitter.com/LivingInPuglia Debbie Lane

    Xmap 1.2.14 for Joomla 1.5 and K2.95 plugin just installed on Joomla 1.5.23. K2 plug in options set to Follow Sub Categories = Yes, Supress Duplicates = Yes, Show K2 Items = always but my site map shows only menu items, no K2 info
    Maybe I’m missing something obvious but not sure what, can you help please
    url for site map is http://www.andiamoinpuglia.co.uk/site-map/1

    • http://www.mherbst.de Martin Herbst

      Hi Debbie,

      there is a bug in the plugin regarding option “Follow Sub Categories”. Please set it to “No” and try again. Also for a test I would suggest to set “Suppress Duplicates” also to “No”.
      Does this help? If not please also check whether the extension is really activated.

      If you can’t get it to work please tell me how you have configured the menu items, i.e. whicht K2 options you were using.

      BTW: it is really a nice web site. It reminds if of my holidays in puglia some years ago :-) .

      Martin

      • http://twitter.com/LivingInPuglia Debbie Lane

        Thanks Martin. I’m a total dingbat (my other aka is Technically Blonde !) – I installed your plug in but didn’t publish it. In the list of Xmap extensions, the plugin had a little red and white cross icon next to it which I took to be a delete icon! Anyway made the changes you suggested, published the plug in and hey presto, everything works fine.

        I’m happy you like my website, I love Puglia and it’s a real pleasure working on the site.

        Ciao, Debbie

        • http://www.mherbst.de Martin Herbst

          You are not the first who made this mistake and you won’t be the last :-) .

          Have a nice weekend.
          Martin

  • http://www.facebook.com/people/Алексей-Скурихин/100001494671517 Алексей Скурихин

    Wrong language code insert link
    see - http://pereval.kiev.ua/index.php?option=com_xmap&view=xml&id=2&lang=ru why “/ua/”???

    joomla 1.7 sh404sef k2 2.5.1

    • http://www.mherbst.de Martin Herbst

      Hi,

      I am not sure whether I can really help you. XMAP calls my extension for each menu item and then it creates a non SEF URL, e.g. index.php?option=com_k2&view=item&id=47. Then the real url will be built by XMAP and sh404sef (I suppose). So I do not have a language that I could set or add.
      What happens if you disable sh404sef and the rewrite rules. Are the links OK? If yes then it is probably a problem of XMAP itself or sh404sef.

      Martin

  • http://twitter.com/mwongzie Mark Mwongela

    I use SEF and URL rewrite (the core components) in joomla 1.7 and it
    works like a charm on the site itself. However, it is not registered by
    the Xmap sitemap, that still shows ‘component/k2/item/’.

    The menu
    items are registered correctly, so I am guessing it is something with
    K2. And yes, I do have the K2 plugin in Xmap enabled. Doesn’t help.Anyone?..

    • http://www.mherbst.de Martin Herbst

      Mark, please give me the URL of the website and expecially the sitemap. Then I could check it and maybe have an idea.

      Martin

  • Rashid Lakhlu

    For some weird reason xml sitemap doesnt show K2 items/categories, although the plugin is enabled, tried playing with “Follow subcategoris”,”Supress duplicates” and stuff, nothing helped :/

    joomla 1.7

    • http://www.mherbst.de Martin Herbst

      Hi Rashid,

      did you install the latest version of the plugin? The older version has some problems with subcategories.
      Then please check the alias names of the menu items (and K2 categories). If they contain characters with an ASCII value >128 where will be problems (I had this problem on a spanish website).
      If everything seems to be OK I need to know how you exactly configured the menu items pointing to the K2 categories. I could then try to reproduce it in my environment.

      Martin

  • JairoR

    Hi. I was trying to install the K2 extension 0.96 for J.1.5 but it isn’t installing. Apparently there is something wrong: 

    Warning: require_once(/home/comasano/public_html/web2/libraries/joomla/installer/adapters/xmap_ext.php) [function.require-once]: failed to open stream: No such file or directory in/home/comasano/public_html/web2/libraries/joomla/installer/installer.php on line 216 

    Does this have anything to do with Xmap?

    • http://www.mherbst.de Martin Herbst

      Hi,

      you have tried to install the extension via the standard Joomla installer. This does not work with Joomla 1.5. You have to use XMAP’s own extension installer.

      Martin

  • Chris

    hi, i am having a little difficulty with this extension, i have updated to 0.96 but i still cant manage to get any of my K2 to show, xmap still just pulls the virtumart menus! what am i doing wrong ?

    Here is an example of a K2 path incase it is this -
    http://www.crash-data.co.uk/en/component/k2/item/114-getting-started-with-your-order/114-getting-started-with-your-order

    • http://www.mherbst.de Martin Herbst

      Hi Chris,

      the sitemap can only contain K2 items or items contained in a category if there is a menu item that referes to the K2 item resp. K2 category. K2 items not connected to any menu (either directly or indirectly via category) will not appear in the sitemap.
      If you have items that are refererenced but not visible please give me some more information:
      - how is the extension configured?
      - how are the menu items configured?
      - which menu items are referencing K2 items resp. categories?

      Martin

  • Darkwizard

    joomla 1.7.3, K2 2.5.4 and xmap 2.2 + XMAP K2 not working. no links in site map :(

    • http://www.mherbst.de Martin Herbst

      Hi.,
      I need some more information to help you: how did you configure the extension and how are the menu items configured that are not visible in the sitemap? It would also be helpful if you could give me the URL of your sitemap.
      Martin

      • Darkwizard

        and in download link Joomla 1.7 you have 1.06, not 1.07

        • http://www.mherbst.de Martin Herbst

          Thank you for this information. I forgot to change to version number in the zip file. Will correct it.

  • http://www.mherbst.de Martin Herbst

    I have uploaded a new zip file with the correct version. Please install this version. Then please check the option “Follow Subcategories”. Try it first with setting “Yes” and if this does not change the behaviour please try setting “No” and tell me the results.
    If both options do not work please check the alias names of you menu items, categories and K2 item. The alias names must not contain characters with an ASCII value higher then 127 (I think). Otherwise there will be problems.
    If nothing helps I will have to update my test environment to the version you are using and then try to reproduce it.

  • akur

    iam use joomla 1.5 and K2 V2.5.0 , instal xmap_k2_0.96 success but in my site map article not show. which must be configured?

    • http://www.mherbst.de Martin Herbst

      First of all you have to activate the extension. Then you should know that the sitemap will only contain K2 articles that are reachable by a menu item, i.e. there must be a menu item that points to the article or a K2 category.
      Also it is very important that the alias names of the menu item and the K2 categories only contain characters with an ASCII value less then 127. 
      If the problem persists please tell me the exact configuration entries of my extension and the menus. Also a link to the sitemap would help me.