DWR Report: What happened to media search field?

What happened to the search box in the media page of the DWR report between August And September 2020? It disappeared at that time. Is it possible for it to come back?

DWR? DWR… DWR…

aahh! Here it is… Dynamic Web Report

I don’t have your answer but maybe someone knows how to find the pre-September version of the add-on code and do a comparison? (I know how to do that for the wiki pages but not code versions.)

1 Like

Only one thing: DynamicWebReport: fix issue with ‘#’ character in media path bug #11919 on sep 14, 2020

2 Likes

Just as a quick test… what happens if you insert the missing chunk of HTML marked in RED below) into a duplicate of the September page’s source code? (Duplicate the page http://home.patrice.legoux.org/genealogie/DWR/2020-09/medias.html to avoid breaking your examples for this inquiry.) Does the search work?

(I am asking if MORE than the searchbox disappeared. Like the indexing subroutine aborted and the form called by the box wasn’t generated.)

<div id=“body-page” class=“container”><h2 class=“page-header”>Index des media</h2><div id=“dwr-index-M_wrapper” class=“dataTables_wrapper form-inline dt-bootstrap no-footer”><div class=“row”><div class=“col-xs-12”><div id=“dwr-index-M_filter” class=“dataTables_filter”><label>Recherche:<input type=“search” class=“form-control input-sm” placeholder=“” aria-controls=“dwr-index-M”></label></div></div></div><div class=“row”><div class=“col-xs-12”>

You might want to list your Media by Modified Date and see if any unusual (or broken link) objects were added since August.

Unusual includes odd filenames that include a character outside A-Z and 0-9. It also includes new filetypes.

Perhaps you found a way to break the indexing.

Since handling of the “#” in the path changed, look for ANY media object that has that character. The patch for bug #11919 might have also changed for other special characters in the paths too.

You should look at the Media path value set in Preferences too.

medias.html (and media.html ??) contains almost nothing:

<!DOCTYPE html>
<html xml:lang="fr" lang="fr" xmlns="http://www.w3.org/1999/xhtml">
<head lang="fr">
<title>Media - Généalogie de Patrice Legoux</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="generator" content="Gramps GrampsAIO64-5.1.1-1 http://gramps-project.org/" />
<meta name="author" content="Legoux, Patrice Philippe" />
<link href="data/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<script language="javascript">
LOAD_SVG_SCRIPTS = false;
LOAD_STATS_SCRIPTS = false;
LOAD_GOOGLEMAP_SCRIPTS = false;
GOOGLEMAPKEY = '';
LOAD_OSM_SCRIPTS = false;

</script>
<script language="javascript" src="data/dwr_start.js">
</script>
</head>
<body>
<script language="javascript">
Dwr.Main(Dwr.PAGE_MEDIA);
</script>
</body>
</html>

Where did you find this div element ?

If I inspect both displayed pages I can see:

I visited the August & September links you posted using Firefox for Windows, selected from the halfway through the “Index des media” header (the chunk above the search box) to the first cell (“ID”) in the table (the chunk below the search box) and chose “view selection source” from Firefox’s pop-up menu. Did the same for both webpages and manually compared.

Perhaps DWR is using some Server Side Includes to assemble the pages? If that is the case, you’ll have to dig back to find the calling page and then drill down into the ‘include’ chunks.

However, the near emptiness of the Media collections is significant. You’ve found a way to make your media paths and/or filenames unpalatable to DWR. This is worth tracking down so the code can be fixed rather tweaking your files so they match what is expected.

Emptyness ? What do you see on your side ? On mine, I see 109 pages of medias (thumbnails) list well displayed.

In 2020-09/data/dwr_body.js I’ve found this code which is in 2020-08 displayed page but not in 2020-09 ??? 08 and 09 dwr_body.js contains the same part of code. I don’t know how it’s possible.

	// Text for the form
	var txt_form1 = '';
	txt_form1 += '<div class="pull-right">';
	txt_form1 += '<form class="navbar-form" role="search" onsubmit="return Dwr.FsearchExec(' + nbSearchForms + ')">';
	txt_form1 += '<div class="input-group">';
	txt_form1 += '<input id="dwr-search-' + nbSearchForms + '-txt" type="text" class="form-control dwr-search" placeholder="' + _('Person to search for') + '">';
	txt_form1 += '<div class="input-group-btn">';
	txt_form1 += '<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>';
	nbSearchForms += 1;
	txt_form1 += '</div>';
	txt_form1 += '</div>';
	if (INC_PAGECONF)
	{
		txt_form1 += ' <button type="button" id="dwr-conf" class="btn btn-default dwr-navbar-toggle-enabled" onclick="window.location.href=\'' + (Dwr.toRoot + 'conf.html?' + Dwr.BuildSearchString()) + '\';"><span class="glyphicon glyphicon-cog"></span></button>';
	}
	txt_form1 += '</form>';
	txt_form1 += '</div>';

The search form is there on all 2020-09 pages but media ??

I misread this as the media objects being gone.

Buried in the JavaScript code is a ‘feature’ that turns off the search box if there are more than 3000 items in the index. This is presumably to keep the pages fairly responsive.

You will note that there is no search box for person index either, (there normally is), because you have over 8000 persons. In your earlier release of your tree, there were 2605 media, in the version with the missing search there are 5439.

If you want to see what happens if you change the limit, in the directory containing your html pages, in data/dwr.js file at line 1810 or nearby is the line
var TABLE_OPTIMIZATION_LIMIT = 3000;
You can up the limit to a much larger number, like 10000.

4 Likes

Thank you. I often use this function when I’m outside and it’s a pain to not have it.

Thanks again; it work pretty well

http://home.patrice.legoux.org/genealogie/DWR/2021-07/medias.html?p=index.html&stxt=boutes%2C%20anian&idx=1393&mdx=8028&pdx=639&simg=[8028%2C9654%2C9725]

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.