*

Ajit Sahane

  • ****
  • 173 posts
  • https://bestclassifiedsusa.com
FAQ category slug not save in DB
« on: December 27, 2024, 01:08:54 PM »
faq_category table showing s_slug NULL in database, that's why category slug not correctly ad in faq sitemap.

how to fix this? 

*

MB Themes

Re: FAQ category slug not save in DB
« Reply #1 on: December 28, 2024, 05:34:37 PM »
I cannot see this field in backoffice. May not be used.
Please create support ticket
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Ajit Sahane

  • ****
  • 173 posts
  • https://bestclassifiedsusa.com
Re: FAQ category slug not save in DB
« Reply #2 on: December 28, 2024, 07:54:36 PM »
If you test it like -  blog, faq, business etc plugin sitemap generate using Sitemap pro plugin then see faq sitemap.

Here category url not adding real category name (s_slug) and showing new-category-c1 & c2 etc

Here is problem. I am notify this error or bug in past and now again.

Currently fixed by adding manual category slug url in phpmyadmin s_slug where NULL showing.

After adding this faq sitemap category url correctly generating using real category name.

This issue happen because of (s_slug) not saving in DB.

Hope you test it and fix soon.

I am fixed itm but hope many other people also see this issue and want to fix.

Thanks. 
 


*

MB Themes

Re: FAQ category slug not save in DB
« Reply #3 on: December 30, 2024, 12:07:12 PM »
If you check plugin code, you realize slug is generated from title.
Code: [Select]
// GET SLUG FOR CATEGORY
function faq_category_slug($category, $locale = '') {
  $text = osc_sanitizeString(faq_category_title($category, $locale));

  if($text == '') {
    $text = 'category';
  }

  return $text;
}
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Ajit Sahane

  • ****
  • 173 posts
  • https://bestclassifiedsusa.com
Re: FAQ category slug not save in DB
« Reply #4 on: December 31, 2024, 02:31:33 AM »
Yes, checked and also improvised like this - 

Code: [Select]
function faq_category_slug($category, $locale = '') {
    // Check if the category has a predefined slug in the database
    if (isset($category['s_slug']) && !empty($category['s_slug'])) {
        return $category['s_slug']; // Return the predefined slug
    }

    // Fallback: Generate slug dynamically from the category title
    $text = osc_sanitizeString(faq_category_title($category, $locale));

    if ($text == '') {
        $text = 'category'; // Default slug if the title is empty
    }

    return $text;
}


This work well to show faq category name - all fine. But when pass to generate faq sitemap using Sitemap Pro plugin then these category slug not getting real name. category slug name not saved in DB so generated faq sitemap showing category urls like - new-category-c1 & c-2 instead of real category s_slug name.  - but when manual enter category name in s_slug table then faq sitemap showing correct category name.

So, i am informing FAQ sitemap category name issue on Sitemap Pro plugin output. So, i think if s_slug category name if saved in DB then this issue solve. Kindly look. OR simply check FAQ sitemap screenshot attached.

here is old thread - https://forums.osclasspoint.com/faq-plugin/how-to-make-a-sitemap-faq/msg40035/#msg40035
« Last Edit: December 31, 2024, 02:42:14 AM by Ajit Sahane »

*

MB Themes

Re: FAQ category slug not save in DB
« Reply #5 on: January 08, 2025, 11:00:20 AM »
Maybe Seo Pro require updated.
As mentioned in old thread, create support ticket and provide details to reproduce issue.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots