OS Property support center

SOLVED !!! Stags managing

  • Enzo Artale
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 1 month ago - 9 years 1 month ago #58877 by Enzo Artale
SOLVED !!! Stags managing was created by Enzo Artale
Hi Dam
I met the following issues in tags managing:
- I've put 4 new tags via frontend in a property I published as owner.
- Tags correctly showed in frontend tag cloud module after listing the property, and I could also see them in backend as admin, both in the tags managing panel and in the property managing one (see first two images).
- Then, I added a new tag via frontend in the same property as owner.
- At this point, the frontend tag cloud module showed just the last tag I added, and the same happened for the property by viewing it from backend properties managing panel as admin (see third image). Beside, in the backend tags managing panel only the last tag added was marked as "item 1", while the previous ones were now all marked as "item 0" (see fourth image).
- Last but not least, trying to delete any tag from tags managing panel, an error message showed (1054 Unknown column 'pro_tag' in 'where clause' SQL=Select id from a1n8y_osrs_properties where pro_tag in (12)), but despite it, the tag was correctly deleted.
Why the previously inserted tags disappear? How to keep all the tags working? And what that error message does mean? Thanks.OLD
Attachments:
Last edit: 9 years 1 month ago by Mr. Dam.

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

More
9 years 1 month ago #58914 by Mr. Dam
Replied by Mr. Dam on topic tags managing
Hi Enzo,
We have just checked the source code and we confirm 2 problems you mentioned in this topic are issues of OS Property. To solve them, please follow these steps.
1. The tags don't show when modifying property at front-end.
Please open file: components > com_osproperty > classes > listing.php
Find
$query = "Select a.keyword$lang_suffix as keyword from #__osrs_tags as a inner join #__osrs_tag_xref as b on b.tag_id = a.id where b.pid = '$row->id'";
$db->setQuery($query);
$lists = $db->loadColumn();

and change to

$query = "Select a.* from #__osrs_tags as a inner join #__osrs_tag_xref as b on b.tag_id = a.id where b.pid = '$row->id'";
$db->setQuery($query);
$lists = $db->loadObjectList();

2. Issue when remove tags at Back-end
Please open file: administrator > components > com_osproperty > classes > tag.php
find

function tag_remove($option,$cid){
global $mainframe;
$db = JFactory::getDBO();
if(count($cid)>0) {
$cids = implode(",",$cid);
$db->setQuery("DELETE FROM #__osrs_tags WHERE id IN ($cids)");
$db->query();

$db->setQuery("Select id from #__osrs_properties where pro_tag in ($cids)");
$rows = $db->loadObjectList();
$property_id_array = array();
if(count($rows) > 0){
for($i=0;$i<count($rows);$i++){
$property_id_array[$i] = $rows[$i]->id;
}
OspropertyProperties::remove($option,$property_id_array);
}
}
$msg = JText::_("OS_ITEM_HAS_BEEN_DELETED");
$mainframe->redirect("index.php?option=$option&task=tag_list",$msg);
}

and replace by

function tag_remove($option,$cid){
global $mainframe;
$db = JFactory::getDBO();
if(count($cid)>0) {
$cids = implode(",",$cid);
$db->setQuery("DELETE FROM #__osrs_tags WHERE id IN ($cids)");
$db->query();

$db->setQuery("Delete from #__osrs_tag_xref where tag_id in ($cids)");
$db->query();
}
$msg = JText::_("OS_ITEM_HAS_BEEN_DELETED");
$mainframe->redirect("index.php?option=$option&task=tag_list",$msg);
}

Thanks
Dam

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

  • Enzo Artale
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 1 month ago #58959 by Enzo Artale
Replied by Enzo Artale on topic tags managing
Hi Dam
I precisely followed your instructions. The issue in removing tags from backend seems to be solved, I can't say if the other one is solved too, because after editing the listing.php file, when I tried to edit my property from frontend as owner, I noticed that many option fields, some mandatory, some not, were disappeared (see images attached), so that I couldn't save neither the new tags added nor any other change. By putting back the old file, the option fields appeared again, but the issue about adding new tags still stood up. I only tried this in my local installation site, I decided to wait for you to reply before test it on line. Waiting for your suggestions, thanks.
Attachments:

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

More
9 years 1 month ago #58961 by Mr. Dam
Replied by Mr. Dam on topic tags managing
Hi,
Please submit ticket and send your site information with super admin acc, ftp acc. I will fix that issue for you.
Thanks
Dam

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

More
9 years 1 month ago - 9 years 1 month ago #58998 by filaretos
Replied by filaretos on topic tags managing
Hello, i have posted a new topic with the option fields disappearing.
I also had the same problem with tags, followed the instructions here but now the option fields disappeared like Enzo.
I have changed back the file and it appears ok now but i ll need the solution with the tags without the fields dissapearing.
Thanks
Last edit: 9 years 1 month ago by filaretos.

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

  • Enzo Artale
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 1 month ago #59026 by Enzo Artale
Replied by Enzo Artale on topic tags managing
Solved! Several issues thorugh one post, great job Dam, as usual. Thanks.

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

More
9 years 1 month ago - 9 years 1 month ago #59053 by filaretos
Replied by filaretos on topic tags managing
Enzo i couldn't help but notice in one of your pictures that you have Stato / Provincia / Citta. As by now in Os property there are 2 fields for location: State and City. How did you add the third one? I am asking cause i want to be able to add a 3rd one also.
If you know how to do it i would really appreciate the help!
Last edit: 9 years 1 month ago by filaretos.

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

  • Enzo Artale
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 1 month ago #59095 by Enzo Artale
Replied by Enzo Artale on topic SOLVED !!! Stags managing
Hi Filaretos
I didn't add any field. I just uploaded the italian location file as it was and translated the labels from english into italian: Country = Stato, State/Province = Provincia, Cities = Città, nothing else. I'd like to help you but I'm afraid I'm unable to, ask Dam, bye.

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

Moderators: Mr. DamNguyen Phu Quan