Sergey

Members
  • Content count

    5
  • Joined

  • Last visited

  1. solution file /administrator/components/com_bt_property/models/property.php in sting 259 find if (empty($data['alias'])) { $data['alias'] = JApplication::stringURLSafe($data['title']); } if (JRequest::getVar('task') == 'save2copy') { list($title, $alias) = $this->generateNewTitle(0, $data['alias'], $data['title']); $data['title'] = $title; $data['alias'] = $alias; }else{ $db->setQuery('SELECT alias FROM #__bt_properties WHERE alias = ' . $db->quote($data['alias'])); $id = JRequest::getInt('id'); if($db->loadResult()){ list($title, $alias) = $this->generateNewTitle(0, $data['alias'], $data['title']); $data['title'] = $title; $data['alias'] = $alias; } and change it if (empty($data['alias'])) { $data['alias'] = JApplication::stringURLSafe($data['title']); } if (JRequest::getVar('task') == 'save2copy') { list($title, $alias) = $this->generateNewTitle(0, $data['alias'], $data['title']); $data['title'] = $title; $data['alias'] = $alias; }else{ $db->setQuery('SELECT alias FROM #__bt_properties WHERE alias = ' . $db->quote($data['alias'])); $id = JRequest::getInt('id'); if($db->loadResult()&& $id==0){ list($title, $alias) = $this->generateNewTitle(0, $data['alias'], $data['title']); //$data['title'] = $title; $data['alias'] = $alias; }
  2. i find my solution - test it now
  3. I think this function needs to check the ID of the record in the database. If the entry already exists, you do not need to change the header and alias automatically.
  4. Problem this fix that when editing an old record and save it - it changes the title and alias, i.e. we edit, for example, a "record1" - it becomes "record2" and so on - the link to the old object changes. need addition to the function "generateNewTitle" in file /administrator/components/com_bt_property/models/property.php
  5. gile /public_html/administrator/components/com_bt_property/models/forms/property.xml and 31-38 strings - chek it, need to be like this (same) <field name="price_time" type="list" default="" label="COM_BT_PROPERTY_PRICE_TIME" description="COM_BT_PROPERTY_PRICE_TIME_DESC" class="inputbox"> <option value="">JNONE</option> <option value="COM_BT_PROPERTY_PRICE_TIME_HOUR">COM_BT_PROPERTY_PRICE_TIME_HOUR</option> <option value="COM_BT_PROPERTY_PRICE_TIME_NIGHT">COM_BT_PROPERTY_PRICE_TIME_NIGHT</option> <option value="COM_BT_PROPERTY_PRICE_TIME_DAY">COM_BT_PROPERTY_PRICE_TIME_DAY</option> <option value="COM_BT_PROPERTY_PRICE_TIME_MONTH">COM_BT_PROPERTY_PRICE_TIME_MONTH</option> <option value="COM_BT_PROPERTY_PRICE_TIME_YEAR">COM_BT_PROPERTY_PRICE_TIME_YEAR</option> </field> frankly, I do not understand why the developers do not notice this mistake or do not recognize it