Aman, I am really sorry for my late reply but I couldn't answer you earlier.
Well, for now the site is offline (it's on development) so I can't give access to it.
But I made further tests and pointed the problem:
- for Joomla Articles that belongs to a menu item, there's no problem.
- but if they are not linked to a menu there's the problem. For what I have seen they need to be linked as a Single Article Menu Item Type (if they belong to a Category List Menu Item Type, it doesn't work)
Let's say, in the json external-data I have 2 urls:
"url":"index.php?option=com_content&view=article&id=164"
"url":"index.php?option=com_content&view=article&id=171"
The first one is in a Menu as a Single Article Menu Item Type. The URL becomes on the fly:
https://www.my-site.com/category/my-article
It works great.
The second URL is part of a Category List Menu Item Type. The URL becomes on the fly:
https://www.www.my-site.com/component/content/article?id=171&Itemid=101
In that case the article is like embeded in the HomePage (where Itemid=101 is the HomePage)
:-(
I don't know if that kind of "bug" comes from your module code or from Joomla that would change the URL on the fly.
If you could you check that, it would be great!
;-)