Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Editing Breadcrumbs layout problem

    zc156 or zc156a


    Somehow breadcrumbs got fouled up and I tried to reset them to the default

    If I copy/paste what is shown as "default"

    Code:
     :: 
    and click UPDATE

    This
    Code:
     :: 
    is shown in the "value" column and

    that is what is displayed.  :: 

    IF I copy the breadcrumbs code from my current, live site
    Code:
    &nbsp;<i class="fa fa-angle-right"></i>&nbsp;
    This is what appears
    Code:
    Home&nbsp;<i class="fa fa-angle-right"></i>&nbsp; MyCategory
    instead of something pretty.

    zc156a install with demo data
    drop tables
    import 154 database
    run zcinstall
    install bootstrap template but after getting things looking nice found out is not ready for 156 with the debug files generated
    change to classic responsive
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  2. #2
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Editing Breadcrumbs layout problem

    Result of the admin sanitizer. Thought I had seen something like that happen with other configuration menu entries, but forgot to put out some sort of bug report. At moment not sure which sanitizer in which to place the field, but will take a look unless someone else jumps in.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Editing Breadcrumbs layout problem

    TNX for confirming is isnt some dumb mistake on my part.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  4. #4
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Editing Breadcrumbs layout problem

    Quote Originally Posted by RixStix View Post
    TNX for confirming is isnt some dumb mistake on my part.
    So the sanitization is that the configuration_value is strictly sanitized which is like the complete encoding of anything you could think of, admin/includes/init_includes/init_sanitize.php refers.

    Thing is, I'm not entirely sure what the thought was behind doing so, which makes it difficult to suggest anything that is not strict or some way on the store front to "undo" what was done... I recall seeing it have some effect to something else I was doing, but as I said I had moved on to the then main issue for me.

    The other "difficulty" is determining which other sanitization would be suggested based on the possibility/likelihood of what could be included in setting a configuration value. I also haven't looked into the new configuration field to see what it's purpose is to perhaps see if it has any factor in this process.

    Anyways, maybe moving it to the grouping including PRODUCT_NAME_DEEP_REGEX?

    My thought behind that is that I thought that the product description regex would support scripts being in the content, which perhaps generally speaking may not be in the "standard" configuration value, and the words and symbols regex seems like it may clean too much out yet still... hopefully though some further guidance/correction of my recommendation will soon come. :/
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Editing Breadcrumbs layout problem

    so the sanitizer is sanitizing the recommended default setting?
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  6. #6
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Editing Breadcrumbs layout problem

    Quote Originally Posted by RixStix View Post
    so the sanitizer is sanitizing the recommended default setting?
    When trying to store the recommended default setting, yes it then sanitizes that. Technically to get the "desired" result of the default, I think one would have to type in a space, two colons and then another space.

    But then, if it were to be edited again, the same text would again have to be added...

    Now, for some reason I thought I remembered something like this in ZC 1.5.5, but I can't recall and am away from my "tools".
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Editing Breadcrumbs layout problem

    If that is all that is needed, then I would suggest putting that in the default text so that it can be copied/pasted right above there in the field. sorta like what I did in the first effort to fix things, or not allow things to be edited if it requires knowledge not readily available to the average user.

    The expectation was that copy/paste would work but I do understand catching every teeny glitch is next to impossible.

    FYI: adding spaces has no effect other than add spaces into the breadcrumbs
    Last edited by RixStix; 9 Jan 2019 at 03:03 AM. Reason: add info
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  8. #8
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Editing Breadcrumbs layout problem

    BTW: preceeding space gets removed. trailing space stays. I misunderstood what you said. I thought you meant 'insert' a space instead of remove the code and just use a space.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  9. #9
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Editing Breadcrumbs layout problem

    Quote Originally Posted by RixStix View Post
    BTW: preceeding space gets removed. trailing space stays. I misunderstood what you said. I thought you meant 'insert' a space instead of remove the code and just use a space.
    No, you understood correctly. I just tried it myself and it appeared actually to remove both spaces. At least when I went back in to review the change.

    After I posted that suggestion I also got to thinking about the "conversion" process, but typically
    Code:
    &nbsp;
    is presented/needed when there is an existing space before the character as multiple spaces in html are treated as a single space, but each
    Code:
    &nbsp;
    is treated as its own space.

    So, the "work around" to this at the moment without modifying the sanitizer script is to execute the following sql in tools->Install SQL Patches:
    Code:
    UPDATE configuration SET configuration_value = '&nbsp;::&nbsp;' WHERE configuration_key = 'BREAD_CRUMBS_SEPARATOR';
    This would allow you to also use your "pretty" divider by substituting the applicable code for
    Code:
    '&nbsp;::&nbsp;'
    leaving/using the single quotes as applicable.

    As said though, without modification of the sanitizer file admin/includes/init_includes/init_sanitize.php adding anything within the configuration options that includes characters such as: &, <, >, ', or " (those items encoded by the function htmlspecialchars) will get modified (double encoded essentially) and cause the display that you described above.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Editing Breadcrumbs layout problem

    Quote Originally Posted by mc12345678 View Post
    No, you understood correctly. I just tried it myself and it appeared actually to remove both spaces. At least when I went back in to review the change.

    After I posted that suggestion I also got to thinking about the "conversion" process, but typically
    Code:
    &nbsp;
    is presented/needed when there is an existing space before the character as multiple spaces in html are treated as a single space, but each
    Code:
    &nbsp;
    is treated as its own space.

    So, the "work around" to this at the moment without modifying the sanitizer script is to execute the following sql in tools->Install SQL Patches:
    Code:
    UPDATE configuration SET configuration_value = '&nbsp;::&nbsp;' WHERE configuration_key = 'BREAD_CRUMBS_SEPARATOR';
    This would allow you to also use your "pretty" divider by substituting the applicable code for
    Code:
    '&nbsp;::&nbsp;'
    leaving/using the single quotes as applicable.

    As said though, without modification of the sanitizer file admin/includes/init_includes/init_sanitize.php adding anything within the configuration options that includes characters such as: &, <, >, ', or " (those items encoded by the function htmlspecialchars) will get modified (double encoded essentially) and cause the display that you described above.
    TNX MC12345678

    I really avoid adding custom code or performing one-off commands as much as possible, so I will just live with the current default which prevents leading spaces. That's only a minor cosmetic issue which no one will know but me.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Breadcrumbs and Categories Problem- flyout menus
    By lloyd_borrett in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 2 Jan 2009, 11:11 PM
  2. Product page breadcrumbs problem... on PHP5 with SEO urls
    By turtledove53 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 24 Apr 2008, 02:46 PM
  3. Editing layout of Column Grid Layout mod
    By digitalhalo in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 3 Jul 2007, 02:14 AM
  4. Editing BreadCrumbs.
    By irrugly in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 18 Jun 2007, 10:01 PM
  5. Move Category Breadcrumbs to far left above layout boxes
    By intenzityHD in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 1 May 2007, 07:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg