Keyword

Trying to Insert a K2 Item / Menu Item via PHP

  • Tim Joseph
  • Tim Joseph's Avatar Topic Author
  • Offline
  • New Member
More
12 years 2 months ago #101138 by Tim Joseph
Hi,

I'm trying to insert a K2 Item using a PHP script to dynamically populate posts. I've got the insert working - it creates a menu item and k2 item. The K2 item is visible in the back end and admin area.

Here's my problem. The K2 item is only accessible via the long link "index.php?....." and not via the alias. IF I go in and update the menu record, the alias works. If I leave it as is, only the long link works.

What is the connection between the menu item and the K2 item I'm missing? Is it in the database? In a log file?

Please Log in or Create an account to join the conversation.

More
12 years 2 months ago #101139 by Lefteris
Probably your script doesn't generate correctly the menu item. Check the database and compare the one generated by your script with one generated by the system.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #101140 by hitest

Tim Joseph wrote: Hi,

I'm trying to insert a K2 Item using a PHP script to dynamically populate posts. I've got the insert working - it creates a menu item and k2 item. The K2 item is visible in the back end and admin area.

Here's my problem. The K2 item is only accessible via the long link "index.php?....." and not via the alias. IF I go in and update the menu record, the alias works. If I leave it as is, only the long link works.

What is the connection between the menu item and the K2 item I'm missing? Is it in the database? In a log file?



Hi Joseph,

Can you please send me your php script for inserting records in k2 item?

Thnaks

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum