×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Joomla 1.5 SEF problem

Joomla 1.5 SEF problem 15 years 8 months ago #616

  • Guillermo Vargas
  • Guillermo Vargas's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
When the notification emails about new comments are sent, the urls are not SEF generated.

I have fixed this modifying the file josc_com_content.class.php, in the function setRowDatas after the line:
		if (defined('_JOSC_J15')) {

add the following
			if (!$row) {
				$query = 'SELECT a.*, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug FROM jos_content AS a LEFT JOIN jos_categories AS cc ON cc.id = a.catid LEFT JOIN jos_sections AS s ON s.id = cc.section AND s.scope = "content" LEFT JOIN jos_users AS u ON u.id = a.created_by  WHERE a.id = '. JRequest::getInt('content_id');
				$db = JFactory::getDBO();
				$db->setQuery($query);
				$row = $db->loadObject();
			}

That is working for me, I'm not sure if it's the right one, but it could help to someone!

Joomla 1.5 SEF problem 15 years 8 months ago #635

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Thank you for your fix. We will check it and add it to 4.0.
Greetings!

Joomla 1.5 SEF problem 15 years 3 months ago #2238

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey there Guillermo, can you post all the body of the setRowDatas function?

Joomla 1.5 SEF problem 15 years 3 months ago #2239

  • Guillermo Vargas
  • Guillermo Vargas's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Hi, here it is! Let me know if you need something else.
Thanks!
        function setRowDatas(&$row)
        {
                /* for optimization reason, do not save row. save just needed parameters */
 
                if (defined('_JOSC_J15')) {
                        if (!$row) {
                                $query = 'SELECT a.*, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug FROM jos_content AS a LEFT JOIN jos_categories AS cc ON cc.id = a.catid LEFT JOIN jos_sections AS s ON s.id = cc.section AND s.scope = "content" LEFT JOIN jos_users AS u ON u.id = a.created_by  WHERE a.id = '. JRequest::getInt('content_id');
                                $db = JFactory::getDBO();
                                $db->setQuery($query);
                                $row = $db->loadObject();
                        }
                        $this->_route_sectionid         = isset($row->sectionid) ? $row->sectionid : 0;
//                      $this->_route_catid             = isset($row->catid) ? $row->catid : 0;
                        $this->_route_catid             = isset($row->catslug) ? $row->catslug : (isset($row->catid) ? $row->catid : 0) ;
                        $this->_route_slug                      = isset($row->slug) ? $row->slug  : (isset($row->id) ? $row->id : 0);
                }
        }
  • Page:
  • 1
Time to create page: 0.103 seconds