Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8156441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:57:16+00:00 2026-06-06T16:57:16+00:00

I use auto CodeIgniter 2.1 + Auto Crumb helper that I get from here

  • 0

I use auto CodeIgniter 2.1 + Auto Crumb helper that I get from here

screenshot

For example my link to edit contact page is http://localhost/caster/contact/edit_contact/13/213bcf

13 is the contact id and 213bcf is the encrypted contact id to prevent user from just change the contact id from the url.

So my Breadcrumb now display invalid url as in the picture above. The desired breadcrumb would be Contact \ Edit Contact. How do I fix or prevent this problem?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T16:57:17+00:00Added an answer on June 6, 2026 at 4:57 pm

    Currently there’s a bug (or perhaps it’s by design but it’d seem silly to be as such) with the autocrumb helper which means that regex pattern replacements aren’t run unless the particular segment has a hyphen (-) or an underscore (_) in it.

    Normally using the config variable $config['strip_regexp'] would be sufficient for your requirements here but alas, not in this case.

    In this case (assuming there wont me more parameters on the end of the URL), you can do the following:

    $ci = get_instance();
    if( preg_match( '#\d+/[a-z0-9]+$#i', $ci->uri->uri_string() ) ) {
        $config['exclude_segment'] = $config['exclude_segment'] + array(
            $total = $ci->uri->total_segments(),
            $total-1
        );
    }
    

    This should be inserted just underneath $config['exclude_segment'] = array(); in the app/config/breadcrumb.php file which basically says if URL ends with numbers/letter-number-pattern then remove the last two segments of the URL from the breadcrumb.

    It’s less than ideal but the bug will need fixing first. Obviously this assumes your URL structure won’t change. You can add additional conditionals into the if to ensure it only occurs on the pages you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use do auto indenting follow lines that begin with python keywords in Vim
I'm trying to use Phil Sturgeon's CodeIgniter Template library , but I can't get
I use auto generated Entity-Framework Data Model for a Database that has 100+ tables.
When editing Java files, if I use auto-complete on a class that hasn't yet
I am planning to use Auto reset Event Handle for Inter Thread communication. EventWaitHandle
I use Netbeans auto format (ctrl+alt+f) a lot. It's a very nice function!. But
In my Asp.Net project I wanna use Property Auto-wiring, e.g. for my ILogger. Basically
Hey, I'm just wondering what code I could use to auto change the size
We use the following function to auto detect if we are on a machine
I need to use ClassMaps instead of auto mapping because of legacy database. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.