Jump to content

Extension talk:JSBreadCrumbs

Add topic
From mediawiki.org
Latest comment: 1 year ago by Cindy.cicalese in topic Selector for Vector (2022) Theme


Add explanation like "Last visited"?

[edit]

Thanks for creating this extension - it looks very useful. I just tested it, but was a bit confused at first, because there were just the links, without any explanation what they were for. Maybe add a description at the start of the line (something like "Last visited:")? Tbleher 16:02, 28 June 2010 (UTC)

I'll add something like that. Thanks for the feedback. Ryan lane 16:02, 28 June 2010 (UTC)Reply
I added this in 0.2. Ryan lane 16:03, 28 June 2010 (UTC)Reply
Is there a parameter to change this? I'd like to experiment with having it, not having it, and having it be something different. Badon 02:10, 18 August 2011 (UTC)Reply
This is a localized message, so like other MediaWiki messages, you can override it via the MediaWiki namespace; the message is: jsbreadcrumbs-leading-description Ryan lane 17:27, 18 August 2011 (UTC)Reply
I did some more research on this, and it looks like I have to got to Special:AllMessages to see all the possibilities, and documentation for messages is here:
http://www.mediawiki.org/wiki/Manual:System_message
Hopefully that info will help anyone else that has the same question. I assume it's possible to change it via a LocalSettings.php parameter. That might be something easy to figure out how to do. If I try to hack on this, maybe I'll start there. Badon 07:10, 19 August 2011 (UTC)Reply

Only visible on edit pane

[edit]

Hi!

I have some kind of a problem with this extension. I only see it, if I edit a page. While browsing pages it does not appears on top.

I'm using vector skin and 1.16beta1.

Can you give me a hint to search for the problem cause ?

Regards, EduRam 09:57, 29 June 2010 (UTC)Reply

Well, that sure is weird. Are you doing any caching on your server? If you are using the file cache, or squid, or varnish, you will likely need to purge your cache after the initial install. You will, for sure, if you are using the file cache.
Check LocalSettings.php for:
$wgUseFileCache = true;
If you have that, you'll need to clear your cache directory (usually <wikidir>/cache).
BTW, does this occur if you are logged in as well? Ryan lane 18:24, 29 June 2010 (UTC)Reply
Hi!
I don't have that flag on my LocalSettings.php file.
User logged in or not, I can only see the history when editing a page :(
Is any kind of php step debug I can do in my installation ?
Thanks for your patience.
Edu 213.58.193.206 17:04, 30 June 2010 (UTC)Reply
Which web browser are you trying this with? Is your site open to the public, so I can see what the issue might be? Ryan lane 19:01, 30 June 2010 (UTC)Reply
I tried with Opera and Chrome.
It's on intranet so not acessible :(
I'll wait for August to upgrade to MW 1.16.beta3.
Then I will test again.
Anyway, thanks for the interest. EduRam 09:17, 2 July 2010 (UTC)Reply
That is the version I tested with. It is possible that 1.6beta1 didn't include the correct version of jquery... Ryan lane 22:26, 5 July 2010 (UTC)Reply

0.5 and 1.16.0, no JQuery

[edit]

I just tried version 0.5 from svn with Mediawiki 1.16.0 (stable release) and the JQuery script is not insterted when this plugin is enabled.

By adding one line in JSBreadCrumbs.hooks.php I was able to correct this (here's a diff):

--- JSBreadCrumbs.hooks.php	2010-07-29 10:39:01.238463930 -0400
+++ JSBreadCrumbs.hooks.php.new	2010-07-29 10:39:57.263476116 -0400
@@ -10,6 +10,7 @@
 		global $wgExtensionAssetsPath;
 
 		if ( self::enableBreadCrumbs() ) {
+			$out->IncludeJQuery();
 			$out->addScriptFile( "$wgExtensionAssetsPath/JSBreadCrumbs/js/BreadCrumbs.js", 7 );
 			$out->addExtensionStyle( "$wgExtensionAssetsPath/JSBreadCrumbs/css/BreadCrumbs.css?1" );
 		}

But even if JQuery is loading now, the breadcrumbs don't show up. 66.36.154.66 14:42, 29 July 2010 (UTC)Reply

There is a possibility that this only works if the usability initiative version of Vector is being used. I'll check this, and get back with you. Ryan lane 17:59, 29 July 2010 (UTC)Reply
I installed the UsabilityInitiative version of the Vector skin and the breadcrumbs appeared. With the new skin, I now see "jquery-ui" is included in the page. Probably this was the "missing link".
A note about this should be added to the Requirements section of the plugin. 66.36.154.66 18:19, 29 July 2010 (UTC)Reply
Yeah. Likely. The need for jquery cookie plugin is likely what the issue is. I don't understand why this isn't included with MediaWiki core. Ryan lane 18:36, 29 July 2010 (UTC)Reply
Updated the documentation to reflect this. Ryan lane 18:38, 29 July 2010 (UTC)Reply

Download broken

[edit]

Upon trying to download a snapshot via the link in the box to the right of the article, the target page reports No such extension "JSBreadCrumbs". JFYI. --91.64.174.228 06:32, 2 September 2010 (UTC)Reply

Ugh. No idea why this is happening. Extension Distributor is broken.... Annoying. Maybe I'll get around to fixing it soon, since I now have access to do so. Ryan lane 01:07, 11 September 2010 (UTC)Reply

Removing Wiki Title

[edit]

Is there a way to prevent the Wiki title from being included along with the page titles in the page trail?

i.e. instead of:

(Wiki Title)foo >> (Wiki Title)baz

I'd have:

foo >> baz

Thanks Enterprise user 17:46, 7 January 2011 (UTC)Reply

$wgDefaultUserOptions['jsbreadcrumbs-showsite'] = false; Ryan lane 03:36, 13 January 2011 (UTC)Reply
Which should be the default. Ryan lane 03:37, 13 January 2011 (UTC)Reply
Got it; I got the LocalSettings.php code from the main page for this extension. The default is mentioned in the comment section, but the variable is set to 'true'. Guess that's where I got mixed up.
Thanks Enterprise user 19:24, 13 January 2011 (UTC)Reply
I fixed that. Changed it to false. Badon 02:08, 18 August 2011 (UTC)Reply

Duplicate entries

[edit]

Hi,

thanks for the extension. Sometimes, on some pages I get duplicate entries in the breadcrumb list:


Do you have any idea, how to solve this problem? Thank you and greetings Filburt 11:36, 14 January 2011 (UTC)Reply

Hmm. That's odd. Duplicates are definitely supposed to be getting stripped. I'll see if I can replicate the issue. Ryan lane 02:25, 25 January 2011 (UTC)Reply
I don't know if you've duplicated this or not yet, but I see that it isn't fixed. I duplicated it. It is a bug triggered by visiting edit, history, and maybe a few other pages, which then show up in the list. Once you visit one of those pages, JSBreadCrumbs will continually add more of them, including the main page, unlimited numbers of times, with no removal of duplicates. It's as if it forgets about removing duplicates for that page.
Those pages should be counted as duplicates and removed. There might be other pages that should be removed too, but I can't think of them off the top of my head. Badon 02:45, 18 August 2011 (UTC)Reply
Thanks for duplicating it. I'll see if I can get time to work on this. I'm pretty swamped right now due to Wikimedia projects... I'd of course take patches, if you happen to fix it before I get to it. Ryan lane 17:24, 18 August 2011 (UTC)Reply
Unfortunately, I'm not a coder, but with some more practice I might be able to play one on TV :) It looks like any of the "&action=" parameter-url pages will trigger this bug. If I start feeling confident, I might try to fix it. Then I'll have to figure out how to produce a patch. Badon 20:34, 18 August 2011 (UTC)Reply
Also, ?title= will trigger the bug too. It looks like any URL variation on the page will trigger the bug. Badon 04:51, 21 August 2011 (UTC)Reply
I fixed this with code that skips adding the current page to the breadcrumbs if it's an action page (edit, view history, ...). The relevant code modifications to /js/BreadCrumbs.js are shown below. Note that you might be reading this post after Ryan has already had a chance to incorporate this or a different fix; get the latest version first.
    // Don't add this page if it's an action page (edit, view history, ...)
    if (!location.search || location.search.indexOf('action=') == -1)
    {
        // Remove duplicates
        ...
        // Add the current page
        ...
        // Ensure we only display the maximum breadcrumbs set
        ...
    }
Sethlivingston (talk) 20:11, 19 July 2012 (UTC)Reply

Not BreadCrumbs for not logged users

[edit]

I'm using:

MediaWiki 1.16.0 Vector 0.2.0 JSBreadCrumbs 0.5

When a user is logged, it works fien, but when a user navigates without login, the breadCrumbs do not apeear.

My configuration:

require_once("$IP/extensions/JSBreadCrumbs/JSBreadCrumbs.php"); $wgDefaultUserOptions['jsbreadcrumbs-showcrumbs'] = true; $wgDefaultUserOptions['jsbreadcrumbs-numberofcrumbs'] = 5; $wgDefaultUserOptions['jsbreadcrumbs-showsite'] = false; $wgJSBreadCrumbsSeparator = "»"; $wgJSBreadCrumbsCookiePath = "/"; 87.221.108.123 16:51, 17 March 2011 (UTC)Reply

Font Size?

[edit]

Is there a way to make the font size a bit smaller? My users like it, only complaint is they wish it was 2 size fonts smaller. Lynxcub 18:31, 13 July 2011 (UTC)Reply

Yes. This is adjustable via the CSS. Ryan lane 18:44, 13 July 2011 (UTC)Reply
Specifically, here is the css you need to override. You can override this in MediaWiki:Common.css Ryan lane 18:47, 13 July 2011 (UTC)Reply
Unfortunately, that doesn't seem to work. I tried it in both the Vector.css and Common.css. Also tried changing the em to px and %, and even tried small/large and had no effect.
I'm sure i'm missing something, just don't know what.
I'm using MW 1.16.x, Default skin in Vector
Edit:
I went through and changed the BreadCrumbs.css, and that seemed to do the trick. Lynxcub 19:56, 13 July 2011 (UTC)Reply

HTML entities usually required for separator character

[edit]

I updated the configuration defaults example with HTML entities. That will prevent screwy displays. Also, I recommend using a semantically correct right arrow character instead of the European double right angle quote. It is this HTML entity:

AMPERSANDGOESHERErarr;

I couldn't get it to let me write in the HTML entity without it getting parsed by the browser, so replace "AMPERSANDGOESHERE" with an ampersand: & Badon 02:39, 18 August 2011 (UTC)Reply

Line 7 of BreadCrumbs.js needs to be updated with an appropriate default HTML entity, like the right arrow. I'm going to go ahead and update the default parameters in the documentation with the semantically correct right arrow instead of the right quote, but I can't update the file. Badon 04:53, 21 August 2011 (UTC)Reply

jquery now included in MW, so can this be modified to use it?

[edit]

Hi.

I tried this extension with MW 1.17.2, but it only shows if Vector skin is used. I need it to work with my custome skin. I understand that MW 1.17+ now has jquery "built-in" without the need for the usability extension or any other tweaks.

Would it be possible to modify this great extension to use 1.17+'s jquery?

Thanks! Mitchelln (talk) 14:44, 22 March 2012 (UTC)Reply

Aha! I sorted it myself :)
There is a check for the vector skin:
	static function enableBreadCrumbs() {
		global $wgUser;
		// Ensure we only enable bread crumbs if we are using vector and
		// the user has them enabled
		if ( $wgUser->getSkin() instanceof SkinVector && $wgUser->getOption( "jsbreadcrumbs-showcrumbs" ) ) {
			return true;
		}
I simply knocked out the vector check. Coupled with the $out->IncludeJQuery(); this all now works :)
Finally I'm free of the old unsupported Breadcrumbs - yay! Mitchelln (talk) 14:48, 22 March 2012 (UTC)Reply
Great job! I wonder if you can persuade User:Ryan Lane to accept a patch from you? Maybe you can rewrite it to make the check configurable? Did you happen to notice why the code was looking for Vector? Badon (talk) 02:29, 30 March 2012 (UTC)Reply
I'd love it if someone took over maintenance of the extension, really. I don't use it in production anywhere anymore, so it doesn't get maintenance or testing at all. I'd also be totally happy to accept patches. It'll be much easier when this is moved to git, since I'll be able to just do a code review and merge of a pushed change. Ryan lane (talk) 17:36, 31 March 2012 (UTC)Reply

Way to avoid the screen jump?

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi.

I've noticed that when the page loads, the breadcrumbs do not load immediately. So the vertical space they occupy is obviously not there. So when the breadcrumbs loads a second or so later it causes the whole page to shunt down.

This is a little disconcerting to see on every page load. Is there a way to prevent this? A CSS tweak perhaps? Or perhaps a skin change is needed to allocate a permanent div?

Any suggestions gratefully received!

Thanks Mitchelln 17:21, 22 March 2012 (UTC)Reply

I have stopped using this extension recently (and some other stuff too) just to speed up load times, but last time I used it, I didn't notice any screen jump. Can you share a demo? What browser is that occurring in? Badon (talk) 02:20, 30 March 2012 (UTC)Reply
It does it on this site:
http://www.aroundisleofwight.info
All browsers, but worse on ones with slow javascript engines e.g. IE8. Still very noticeable on firefox and chrome. though. Mitchelln (talk) 14:40, 6 July 2012 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Proposal: Merge with BreadCrumbs

[edit]

Hey! I took over maintaining the Extension:BreadCrumbs about 6 months ago, and I've been thinking that the functional duplication between that and Extension:JSBreadCrumbs is pretty wasteful. JSBreadCrumbs is much faster (and more stable) than BreadCrumbs, but provides no fallback for pageloads without Javascript. I'd like to integrate the two to create a fast, flexible, and more powerful BreadCrumbs extension. Here's what I'm thinking: By default, the new extension will behave exactly the same as JSBreadCrumbs: drop a div on the page and let the Javascript fill it in. However, add a global variable (i.e. an option for administrators) for a pure, server-side implementation, which will provide exactly the same output as the JavaScript. This will make the extension useful in environments in which Javascript use is not preferable (e.g. Internet Explorer-favoring environments, or js-paranoid browsers). AABoyles (talk) 16:08, 11 January 2013 (UTC)Reply

Sounds fine to me. I'm not actively maintaining JSBreadCrumbs. Merge away. Ryan lane (talk) 23:16, 12 January 2013 (UTC)Reply
Thanks a lot! Will do. AABoyles (talk) 19:08, 14 January 2013 (UTC)Reply

Woking with MediaWiki 1.24.1?

[edit]

Is it possible that this Plugin is not working with MediaWiki 1.24.1? 77.117.78.64 14:06, 5 February 2015 (UTC)Reply

Not working here (1.24.1, Windows, localhost, sqlite) ; cookie related issue ? gilles (talk) 16:53, 19 February 2015 (UTC)Reply
Did anyone else get this working on 1.24?
I needed to download JQuery Cookie script. Then add the following line in JSBreadCrumbs.hooks.php:
$out->addScriptFile( "$wgExtensionAssetsPath/JSBreadCrumbs/js/jquery.cookie.js", 7 );
right above (line 10):
$out->addScriptFile( "$wgExtensionAssetsPath/JSBreadCrumbs/js/BreadCrumbs.js", 7 );
Then it started working. kevstoy (talk) 18:00, 11 May 2015 (UTC)Reply

Working with Semantic Title

[edit]

If you'd like to get this working with Semantic Title please view this link Extension talk:Semantic Title#c-86.173.151.195-2015-02-16T19:15:00.000Z-Missing_function_for_calling_from_other_extensions I also had a problem with the variables not being passed to the javascript and that page also has a workaround using addJsConfigVars rather than $wgHooks['MakeGlobalVariablesScript'][]

Many thanks Duncan 86.173.151.195 15:25, 28 February 2015 (UTC)Reply

Exposure of crumbs to anonymous users

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I realize that the crumbs are always being shown to anonymous users. Setting $wgDefaultUserOptions['jsbreadcrumbs-showcrumbs'] = false; however disables the breadcrumbs also for logged in users. @Kevstoy: It will be great if this could somehow be fixed.

My setup
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

What about 1.0.1?

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Many translations and translation fixes rolled in since the last release. Perhaps it is time to get them to the public by authoring and tagging 1.0.1. @Cindy.cicalese: [[kgh]] (talk) 21:26, 23 January 2018 (UTC)Reply

Done! Cindy.cicalese (talk) 20:42, 29 January 2018 (UTC)Reply
Wow, cool! Thank you. I just updated the docu. :) [[kgh]] (talk) 21:44, 29 January 2018 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to make it work?

[edit]

Unfortunately, even though I installed and configured everything as required, I keep seeing only the words "Die 5 zuletzt angesehenen Seiten:" (5 most recently visited pages) but not the titles/links to these pages themselves. Are there any more prerequisites than described?

MW version: 1.31.0

JSBreadcrumbs Version: 1.0.2 (6435220) 15:18, 9. Mär. 2018

Thanks for any hint!

Stine22 Stine22 (talk) 11:12, 26 June 2018 (UTC)Reply

Usually you should already see links just after invoking the extension. However I realized too on a 1.31.0 - this started already with 1.30.0 that there is a big time lag between visiting pages and their actual display. So there are caching issues or bad interaction with another extension. Cannot tell exactly though. [[kgh]] (talk) 13:19, 26 June 2018 (UTC)Reply
@Stine22, since the breadcrumbs are rendered with JavaScript, check the JavaScript console to see if there is an error. @Kghbln, I haven't seen a lag in 1.31, but I also don't see the breadcrumbs at the sandbox link you included. Cindy.cicalese (talk) 16:59, 26 June 2018 (UTC)Reply
Ah, my mistake. I always hide crumbs on "Main Page". Just browsed a bit and it works, though only for pages visited in the main namespace. [[kgh]] (talk) 18:35, 26 June 2018 (UTC)Reply
There was a bug that has now been fixed that was probably affecting you. I hope that the new version fixes the problem you were observing. Cindy.cicalese (talk) 05:03, 6 July 2018 (UTC)Reply

Not all pages considered for the navigation trail

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I now know what made me believe that something is broken. Pages like London are shown however pages like Lorem ipsum Export are not. Moreover only pages in the main namespace are shown. This started with MW 1.30 so I wild guess could be a remex related issue or so, perhaps this commit which was also tough on SMW. I may be wrong though. [[kgh]] (talk) 15:02, 28 June 2018 (UTC)Reply

I'm seeing the same problem. I did a little bit of debugging, and it doesn't seem to be saving the new array of cookies consistently. I will have to dig into this some more. Could you please create a Phabricator task for this? Thanks! Cindy.cicalese (talk) 17:06, 4 July 2018 (UTC)Reply
I've submitted a patch that may fix this problem: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/JSBreadCrumbs/+/443901. Could you please test? Thanks! Cindy.cicalese (talk) 07:42, 5 July 2018 (UTC)Reply
You are faster than the police. ;) I have just successfully tested this patch-set on sandbox. Pages in different namespaces are now shown again and all pages in the main namespace, too. [[kgh]] (talk) 15:52, 5 July 2018 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Doesn't work in Timeless skin

[edit]

Do you have any plans to update this extension to work with Timeless skin? Crismagnabosco (talk) 14:11, 5 October 2018 (UTC)Reply

Could you please describe what the issue is in Timeless? It may be an issue of setting the appropriate CSS selector in your configuration to insert the breadcrumbs at. It would be good to know if that is the issue or if it is something else. Please also include version information. Cindy.cicalese (talk) 15:44, 5 October 2018 (UTC)Reply
I'm updating the Mediawiki 1.31 and trying to use the Timeless skin. If I use the Vector skin, the JSBreadCrumbs works fine, but if I change to Timeless, the bread crumbs isn't showned in the page. Crismagnabosco (talk) 16:17, 5 October 2018 (UTC)Reply
@Isarra, is there a CSS selector that would be best to use to insert the breadcrumbs in Timeless? The default is "#top", but I don't know if this exists in Timeless. The selector can be changed with a configuration variable ($wgJSBreadCrumbsCSSSelectorHorizontal) for testing. Once we know what the correct value is for Timeless, I can also add it as a default in the code (https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/JSBreadCrumbs/+/master/resources/JSBreadCrumbs.js#101). Cindy.cicalese (talk) 17:27, 5 October 2018 (UTC)Reply
#firstHeading should be right. However, $wgJSBreadCrumbsCSSSelectorHorizontal doesn't work as advertised (and the whole logic of choosing the right selector programmatically seems to be somewhat flawed), so i ended up monkeypatching th whole thing to make it work:
# diff -ub resources/JSBreadCrumbs.js{.orig,}
--- resources/JSBreadCrumbs.js.orig     2021-04-14 12:07:31.194729971 +0200
+++ resources/JSBreadCrumbs.js  2021-04-14 12:09:01.268802485 +0200
@@ -103,7 +103,8 @@
                               } else if ( skin === 'foreground' ) {
                                       selector = '#mw-js-message';
                               } else {
-                                       selector = '#top';
+                                       // selector = '#top';
+                                       selector = '#firstHeading';
                               }
                               $( selector ).before( 92.72.242.79 (talk) 10:13, 14 April 2021 (UTC)Reply
For me
I Change File in /resources/JSBreadCrumbs.js
                         if ( horizontal ) {
                                if ( skin in cssSelector ) {
                                        selector = cssSelector[ skin ];
                                } else if ( skin === 'foreground' ) {
                                        selector = '#mw-js-message';
+                               } else if ( skin === 'timeless'){
+                                       selector = '#firstHeading';
                                } else {
                                        selector = '#top';
                                }
                                $( selector ).before( 49.159.22.68 (talk) 17:42, 5 June 2022 (UTC)Reply

Cookies documentation?

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


It appears that this extension creates three cookies when accessing a wiki (obviously no login required):

  • mwext-bc-site
  • mwext-bc-title
  • mwext-bc-url

I believe it will be good to document their purpose and their behaviour. I am asking due do increased documentation requirements as a result of tough European privacy regulations. [[kgh]] (talk) 13:14, 17 June 2019 (UTC)Reply

Actually, the current version only uses a single cookie, mwext-jsbreadcrumbs. I have added a statement to that effect to the extension page. Cindy.cicalese (talk) 13:38, 10 July 2019 (UTC)Reply
Thanks for the info. I was pretty sure to use the latest release when detecting the three cookies. Anyways good to know and thanks for updating. [[kgh]] (talk) 13:41, 10 July 2019 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Foreground skin left and right margin

[edit]

Currently the "Last 5 Pages Viewed" box runs from the very left to the very right of the screen.

Foreground skin has headings, text, etc with a lot of white space on either side (on wide screens anyway).

Is there any way to get the breadcrumbs box to align with the Foreground skin?

Thanks. Jonathan3 (talk) 14:15, 25 February 2020 (UTC)Reply

I've put the following in Common.css. It's not perfect but it's good enough until someone lets me know a better answer! :-) @Kghbln and Cindy.cicalese:  ?
.jsbc-breadcrumbs {
	max-width: 90em; /* size */
	margin: 0 auto; /*centre*/
}
Jonathan3 (talk) 15:20, 25 February 2020 (UTC)Reply
That is a reasonable way to accomplish that. Cindy.cicalese (talk) 15:24, 25 February 2020 (UTC)Reply
Thanks for the quick response! I found a slightly better way (for me anyway). I added
<div id="put-jsbc-here" style="display:none;"></div>
to the bottom of my MediaWiki:SiteNotice, which is where I wanted the breadcrumbs, and which is within Foreground's div/grid structure.
Then I just needed to add
$wgJSBreadCrumbsCSSSelectorHorizontal['foreground']="#put-jsbc-here";
to LocalSettings.php Jonathan3 (talk) 15:51, 25 February 2020 (UTC)Reply
Even better! Cindy.cicalese (talk) 23:26, 25 February 2020 (UTC)Reply

Wrong URLs are generated

[edit]

The issue is a showstopper, because links are not usable.

My wiki uses URLs like this:

HTTPS://somewiki.com/index.php/PageName.

JSBreadCrumbs generates URLs like this:

HTTPS://index.php/PageName


Extension decides that index.php is the domain and I get:

This site can’t be reached

Check if there is a typo in index.php.

DNS_PROBE_FINISHED_NXDOMAIN


Sometimes there are pages that are generated correctly. I cannot find when the bug shows up. In 80% or 90% links are wrong.


Any ideas? Joroldr (talk) 08:41, 26 February 2021 (UTC)Reply

What version of MediaWiki and what version of JSBreadCrumbs are you using?
The breadcrumb URLs are generated by the code at https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/JSBreadCrumbs/+/refs/heads/master/resources/JSBreadCrumbs.js#37. If you enable debugging (add "?debug=true" to the URL) and use the browser's debugger, you should be able to stop at that line and see what is being constructed. Cindy.cicalese (talk) 17:43, 26 February 2021 (UTC)Reply

Latest version for MW 1.35

[edit]

The available version for MW 1.35 via ExtensionDistributor [1] is 1.0.3 (at least this results from extension.jsonof JSBreadCrumbs-REL1_35-b4d0b95.tar.gz), but the latest version is 1.1.0.

[1] https://www.mediawiki.org/wiki/Special:ExtensionDistributor?extdistname=JSBreadCrumbs&extdistversion=REL1_35

Why isn't redirecting to it? Or is it wrong labeled? S0ring (talk) 08:50, 22 April 2021 (UTC)Reply

JSBreadcrumbs uses the 'master' compatibility policy (see Compatibility#MediaWiki extensions). To get the most recent code, you need to select the master branch in Extension Distributor or use git to pull the tag you want. Cindy.cicalese (talk) 16:57, 22 April 2021 (UTC)Reply

Issue and Suggestion

[edit]

I have several duplicated entries in the breadcrumb. My assumption for the reason is that the following two cases are not distinguished in the duplicate checking logic:

/index.php/Main_Page

/index.php?title=Main_Page&action=view 2003:E7:5705:2600:A0B5:4117:F1A8:14F6 (talk) 13:52, 8 July 2021 (UTC)Reply

Issue: Warning in Browser

[edit]

I use Moxilla firefox v90.0 in my Ubuntu Desktop.

On loading the extension, I get the following error:

Cookie “mwext-jsbreadcrumbs” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute.

Please fix this. 2405:201:13:BAD5:0:0:C0A8:2 (talk) 06:45, 27 July 2021 (UTC)Reply

git clone doesn't put extension into the needed directory name

[edit]

Cool extension, thank you for putting it together! I installed this via git clone from https://gerrit.wikimedia.org/g/mediawiki/extensions/JSBreadCrumbs because that's the easiest way to record it in my install script. The directory it pulls into is not named as it should be for the extension name. It's a small problem, I know how to rename it, but it took me a few minutes to figure out why it wasn't working. So, if it would be easy to change, that would be an improvement. Thanks! Tenbergen (talk) 05:18, 23 November 2021 (UTC)Reply

Hi :-) What is the name of the directory that it pulls into? What is the exact git clone command you used? It works as expected for me. Cindy.cicalese (talk) 13:28, 23 November 2021 (UTC)Reply
Hi Cindy! Sorry, I should have been more specific. I was cloning from Github. If I run
git clone https://github.com/wikimedia/mediawiki-extensions-JSBreadCrumbs
it clones into
mediawiki-extensions-JSBreadCrumbs
I was cloning from Github because cloning from gerrit as per the instructions on the top of the page didn't work for me. There it says
git clone ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/JSBreadCrumbs
and if I try that I get an error
Cloning into 'JSBreadCrumbs'...
XXXXX@gerrit.wikimedia.org: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
I have looked back at how I get other extensions, and I can get them from gerrit, but I need to use
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/JSBreadCrumbs
and if I use that it clones to the correct directory. Would it make sense to change the instructions at the top of the repo page so they use that? Tenbergen (talk) 20:04, 23 November 2021 (UTC)Reply
If you want to clone into a directory with a different name from the last segment of the path, you just add another parameter with the name of the directory:
git clone https://github.com/wikimedia/mediawiki-extensions-JSBreadCrumbs JSBreadCrumbs
Unfortunately, those instructions on gerrit are not editable by me. Perhaps Template:ExtensionInstall on mediawiki.org could be expanded to add instructions for downloading from git. Cindy.cicalese (talk) 21:24, 23 November 2021 (UTC)Reply
Good idea. Will have posted a comment at Template talk:ExtensionInstall#Installing / downloading. And since I was there I added another issue I recently encountered right below that one. Thanks for sending me in the right direction.
Too bad you can't edit the instructions on gerrit. If you don't know how (and whether at all) that would get changed it's probably unchangable. And who knows, maybe those who actually develop this need the syntax to be that way for other reasons... Tenbergen (talk) 01:54, 24 November 2021 (UTC)Reply

Example for $wgJSBreadCrumbsCSSSelectorHorizontal?

[edit]

Could you please provide an example of using $wgJSBreadCrumbsCSSSelectorHorizontal? 108.26.187.20 (talk) 22:53, 18 December 2021 (UTC)Reply

Answering my own question: to place the breadcrumbs in the footer for the Vector skin:
$wgJSBreadCrumbsCSSSelectorHorizontal['vector'] = '#footer-info'; 108.26.187.20 (talk) 18:33, 19 December 2021 (UTC)Reply

vertical option is not formatted correctly with MW 1.37.1 and a quick fix

[edit]

for default vertical option it is not formatted correctly with the wiki css and this to fix it.

sed -i 's/body/vector-menu-content/' extensions/JSBreadCrumbs/resources/JSBreadCrumbs.js

sed -i 's/portal/mw-portlet mw-portlet-navigation vector-menu vector-menu-portal portal/' extensions/JSBreadCrumbs/resources/JSBreadCrumbs.js Amm1234 (talk) 22:59, 14 January 2022 (UTC)Reply

Thank you for reporting this and providing a fix. I created https://phabricator.wikimedia.org/T300256 to track it. Cindy.cicalese (talk) 13:14, 27 January 2022 (UTC)Reply

Remove or edit the "Last 5 Pages Viewed: " text

[edit]

I would like to remove the text "Last x Pages Viewed: " automatically added at the beginning of the line, to improve GUI and simplicity. But this text seems not to be a DOM element on which we can act.

<span id="mwext-bc" class="noprint plainlinks jsbc-breadcrumbs">Last 5 Pages Viewed: <a> ... </a>  →  <a> ... </a></span>

Is there a solution to change this content ? Could you provide this as a new configuration flag or preference ?

Thanks a lot for this development and your support. Pierre. Pitchke (talk) 10:05, 3 July 2022 (UTC)Reply

Yes. Edit the "MediaWiki:Jsbreadcrumbs-intro-horizontal" page to change this text. [[kgh]] (talk) 16:43, 3 July 2022 (UTC)Reply
Great, indeed it works fine.
This is not explicitely documented for the extension but I now learned that various System Messages can be edited as shown in a wiki at Special:AllMessages page.
Just sharing here for other people interrested.
Thanks Karsten. Pitchke (talk) 11:16, 4 July 2022 (UTC)Reply

Is there a way to suppress the namespace?

[edit]

Is there a way to suppress the namespace in the list of visited pages? Wikinaut (talk) 12:19, 29 September 2023 (UTC)Reply

No, that is not currently a feature, although it could be implemented. Cindy.cicalese (talk) 15:21, 29 September 2023 (UTC)Reply
Okay, I will try to implement it, most likely as an option for LocalSettings or as something via CSS. Wikinaut (talk) 15:37, 29 September 2023 (UTC)Reply
You should be able to follow the pattern of other preferences in the extension to add it as an option. Cindy.cicalese (talk) 15:47, 29 September 2023 (UTC)Reply
Yes, of course. Wikinaut (talk) 15:52, 29 September 2023 (UTC)Reply
However, just in case that you find it easy for you, I would be prefer you code that, I help and document it. Wikinaut (talk) 15:53, 29 September 2023 (UTC)Reply

does this extensions work with the Citizen theme?

[edit]

hiya

i've uploaded the extension and loaded it through LocalSettings.php, but nothing appears anywhere. The extension is correctly installed, as the version page shows the extension.

is this extension supported on the Citizen theme?

I'm using MediaWiki 1.39.6 Jakeriper1 (talk) 01:48, 2 January 2024 (UTC)Reply

To support the Citizen theme add this to your LocalSettings.php
$wgJSBreadCrumbsCSSSelectorHorizontal = [
'citizen' => '#footer-tagline'
]; Kimmywingz (talk) 22:27, 18 November 2024 (UTC)Reply

Selector for Vector (2022) Theme

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


In case anyone else is looking for a selector to add because their breadcrumbs disappear in Vector (2022), I found this to work pretty well:

   $wgJSBreadCrumbsCSSSelectorHorizontal = [
     'vector-2022' => '#mw-content-subtitle'
   ]; Wim-number37 (talk) 22:19, 12 October 2024 (UTC)Reply
Thank you for submitting this. It is now included in version 1.1.2 of the extension (see https://gerrit.wikimedia.org/r/c/mediawiki/extensions/JSBreadCrumbs/+/1110381). Cindy.cicalese (talk) 18:02, 12 January 2025 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.