Pagination in osclass categories is not working in rtl languages ar or zh etc...
on :October 24, 2024, 9:04 pm #805
Re: Pagination in osclass categories is not working in rtl languages ar or zh etc...
on :October 30, 2024, 7:03 pm #806
Does anyone know what file is responsible for this glitch in the above mentioned problem.. so I can work on fixing it?
Re: Pagination in osclass categories is not working in rtl languages ar or zh etc...
on :October 31, 2024, 8:05 am #807
I didn't have time to check but i will make some tests.
Re: Pagination in osclass categories is not working in rtl languages ar or zh etc...
on :October 31, 2024, 6:00 pm #808
Thank you for trying to help and I hope you share your experience. I am waiting for you.
Best regards
Re: Pagination in osclass categories is not working in rtl languages ar or zh etc...
on :November 2, 2024, 7:07 pm #809
Hello
Is there anything new if you can provide a solution to this error it will be appreciated
Thank you
Re: Pagination in osclass categories is not working in rtl languages ar or zh etc...
on :November 5, 2024, 11:32 am #810
I made some investigation, and i think i found a bug in the code, but i am not sure 100%.
In oc-includes/osclass/model/search.php around line 100 it's a condition that will run if all the code above will not set the category
$category = Category::newInstance()->findBySlug($search_uri);
And this code will search for the category slug from the link but if the name of the category is urlencode already in the link the function that search after slug will urlencode again the category
public function findBySlug($slug)
{
$slug = trim((string)$slug);
if($slug!='') {
if(isset($this->_slugs[$slug])) {
return $this->findByPrimaryKey($this->_slugs[$slug]);
}
$slug = urlencode($slug);
// $this->dao->where('b.s_slug', $slug);
// end specific condition
$results = $this->listWhere('b.s_slug = %s', $slug);
if (count($results) > 0) {
$this->_slugs[$slug] = $results[0]['pk_i_id'];
return $results[0];
}
}
return array();
}
Re: Pagination in osclass categories is not working in rtl languages ar or zh etc...
on :November 5, 2024, 9:16 pm #811
Thank you very much for your effort. Your concern is appreciated.
But I have not reached a solution yet. I will review this file in case I reach a solution.
Regards
Re: Pagination in osclass categories is not working in rtl languages ar or zh etc...
on :November 6, 2024, 8:38 am #812
A temporary solution
Old code
try {
$category = Category::newInstance()->findBySlug($search_uri);
} catch (Exception $e) {
}
if(count($category) === 0) {
$this->do404();
}
Params::setParam('sCategory', $search_uri);
New code
try {
$sD= urldecode($search_uri);
$category = Category::newInstance()->findBySlug($sD);
} catch (Exception $e) {
}
if(count($category) === 0) {
$this->do404();
}
Params::setParam('sCategory', $sD);
But this is only temporary, I haven't had time to test to see if everything is fine.
Re: Pagination in osclass categories is not working in rtl languages ar or zh etc...
on :November 6, 2024, 10:51 pm #813
Thank you for helping me find a solution but I see some differences in the file code oc-includes/osclass/model/search.php
What version of osclass are you using?
I am using the latest version is Osclass 8.2.1
Re: Pagination in osclass categories is not working in rtl languages ar or zh etc...
on :November 7, 2024, 12:30 am #814
The solution was done through the last code and now I am testing everything. Thank you very much for the excellent technical support. You are a genius. My regards to you.