Content Connector

  • marremp
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 4 months ago #1923 by marremp
Content Connector was created by marremp
Hi

I try to connect DJ Classified 3.1.2 to Custom Properties 2.3.7 (Joomla 2.5).

I created a xml content connector file, but when I try to install it does not work (XML Parsing Error at 68:18. Error 76: Mismatched tag).

Could you help me at doing this ? I certainly did a mistake womewhere...

Here is the xml file :

<?xml version="1.0" encoding="utf-8"?>

<contentelement type="customproperties" ordering="12" active="1">
<name>djclassifieds</name>
<version>3.1.2/version>
<description>Content Element for Joomla 2.5 DJ Classified 3.1.2 content element</description>

<content_table required="1">
<table name="table" required="1">djcf_items</table>
<field name="label" type="text" required="1">Annonces</field>
<field name="id" type="fieldname" required="1">id</field>
<field name="title" type="fieldname" required="1">name</field>
<field name="title_alias" type="fieldname" required="0">alias</field>
<field name="catid" type="fieldname" required="0">cat_id</field>
<field name="created" type="fieldname" required="0">date_sort</field>
<field name="introtext" type="fieldname" required="0">intro_desc</field>
<field name="fulltext" type="fieldname" required="0">description</field>
<field name="state" type="fieldname" required="1">published</field>
<!-- state_values takes a comma delimited series of values the article state can assume
in the following sequence: Published, Not Published, Archived (P,N,A).
If not set it defaults to 1,0 where Published = 1, Not published = 0, Archived = undefined / not applicable.
-->
<field name="publish_up" type="fieldname" required="0">date_start</field>
<field name="publish_down" type="fieldname" required="0">date_exp</field>
<!-- if images is set, images_dir is required -->
<field name="images" type="fieldname" required="0">image_url</field>
<field name="images_dir" type="text" required="0">images</field>
<field name="ordering" type="fieldname" required="0">ordering</field>
<!-- following pars serve to put together the url to open the detail view
of the content item
e.g. option=com_content&task=view&id=<replaced with id>
Joomla 1.5 and above supports the view param, so it is avisable tu use 'href_view' instead of href_task
-
slug links generates links as id:title-alias
-
if href_catid is set the url becomes
href_id:value of title_alias&href_catid:value of cat_table_alias
e.g. id:title-alias&catid=category-alias
-->
<field name="href_option" type="text" required="1">com_djclassifieds</field>
<field name="href_task" type="text" required="0"></field>
<field name="href_view" type="text" required="1">item</field>
<field name="href_id" type="text" required="1">itemid</field>
<field name="slug_links" type="text" required="0">1</field>
<field name="href_catid" type="text" required="0">cid</field>
<!-- for an unfathomable reason Joomla developers decided to use a different variable name
for article id when editing from the frontend, so there it is: a new variable in Cp content element :( -->
<field name="edit_href_id" type="text" required="0">id</field>
</content_table>

<!-- required fields of category table , are required only if category table exists -->
<category required="0">
<table name="table" required="1">djcf_categories</table>
<field name="cat_table_id" type="fieldname" required="1">id</field>
<field name="cat_table_title" type="fieldname" required="1">name</field>
<field name="cat_table_alias" type="fieldname" required="0">alias</field>
<field name="cat_table_published" type="fieldname" required="0">published</field>
<!-- see above, same syntax as state_values
If not set it defaults to 1 = published, 0 = not publishes, Archived = not set
-->
<field name="cat_table_ordering" type="fieldname" required="0">ordering</field>
<!-- if the filter field is set, filter_value is mandatory -->
<!-- the next parameter allows nested categories -->
<field name="cat_table_parent_id" type="fieldname" required="0">parent_id</field>
</category>

</contentelement>


Thank you very much !

Marina

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

More
10 years 4 months ago #1924 by andrea_4g
Replied by andrea_4g on topic Content Connector
I think there's a syntax error here (missing < ):
Code:
<version>3.1.2/version>

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

  • marremp
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 4 months ago #1925 by marremp
Replied by marremp on topic Content Connector
Oops... Thank you Andrea !

I installed it successfully, the new category appear in the "Assign" page but when I tried to assign tags, I have this SQL syntax error :

JDatabaseMySQLi::query: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as state ,c. as created ,IFNULL(cat.name, "Uncategorised") AS category FROM c4e' at line 1 SQL=SELECT SQL_CALC_FOUND_ROWS c.id AS id ,c.name as title ,c. as state ,c. as created ,IFNULL(cat.name, "Uncategorised") AS category FROM c4eb2_djcf_items AS c LEFT JOIN c4eb2_djcf_categories cat ON(c. = cat.id) WHERE 1 AND c. >= 0 ORDER BY c.name asc LIMIT 0, 20

Thanks for your help !

Marina

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

More
10 years 4 months ago #1926 by andrea_4g
Replied by andrea_4g on topic Content Connector
There seems to be a few fields missing from the connector (I understand you modified the connector you posted above). See following screenshot.



The missing fields are (in order):
- state
- created
- catid
Attachments:

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

Time to create page: 0.168 seconds