Ticket #1108 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

[TiddlyWebWiki] serverlink broken for newly created tiddlers

Reported by: FND Owned by: FND
Priority: trivial Milestone:
Component: TiddlyWebWiki Version:
Severity: trivial Keywords: plugins client
Cc:

Description

 TPC's  serverlink is missing a trailing slash in server_prefix on newly-created tiddlers.

Change History

Changed 3 years ago by FND

  • keywords client added

Changed 2 years ago by cdent

This is happening because of a strange confluence of things:

* existing tiddlers use server.host as set by the server, which includes the server_prefix and a trailing slash * new tiddlers use the inherited server.host field, which is set by the server.host field on TiddlyWebConfig?, but passed the adaptors fullHostName code, which strips the trailing slash:

AdaptorBase.prototype.fullHostName = function(host)
{
	if(!host)
		return '';
	host = host.trim();
	if(!host.match(/:\/\//))
		host = 'http://' + host;
	if(host.substr(host.length-1) == '/')
		host = host.substr(0,host.length-1);
	return host;
};

I'm not sure where the fix lies.

Changed 2 years ago by FND

  • status changed from new to closed
  • resolution set to fixed

fixed in changeset:11289

Note: See TracTickets for help on using tickets.