template and publication filtering weirdness

13 views
Skip to first unread message

M. A.

unread,
Jan 27, 2016, 12:00:09 AM1/27/16
to J!Research Support
I have a couple weird things happening with filtering. I have display filter by team, type of pub, and research area set to no. That leaves the search box, Year and Authors. If I use any of those to filter the list, the new page that appears adds the type of pub, team, and research area filters to the page. Other settings like hiding the More link and showing the Digital version also disappear. How can I fix these things?

I'm using g5_hydrogen for my template. It has the ability to assign different menu items to different template within the same general theme. So, my home page has one look and my other pages a different look. The theme the Publications menu item is assigned is the "default" theme for the website. When I filter the publications, jresearch returns the template for the home page and not the default template. Any thoughts as to what I can do to fix that?

thanks!

M. A. 

M. A.

unread,
Jan 27, 2016, 7:20:26 PM1/27/16
to J!Research Support
I sort of solved the template problem by enabling the Page Content position on the home page template. It isn't idea because I would prefer the search output to use the default template.

Luis Galárraga

unread,
Jan 29, 2016, 8:44:35 AM1/29/16
to jresearc...@googlegroups.com
Hi,


I have a couple weird things happening with filtering. I have display filter by team, type of pub, and research area set to no. That leaves the search box, Year and Authors. If I use any of those to filter the list, the new page that appears adds the type of pub, team, and research area filters to the page. Other settings like hiding the More link and showing the Digital version also disappear. How can I fix these things?

Unfortunately I cannot reproduce this bug. Is your website publicly accesible? I think I may need some in-situ debugging. Could you also provide some information about your platform, i.e., PHP & Joomla! version?


I'm using g5_hydrogen for my template. It has the ability to assign different menu items to different template within the same general theme. So, my home page has one look and my other pages a different look. The theme the Publications menu item is assigned is the "default" theme for the website. When I filter the publications, jresearch returns the template for the home page and not the default template. Any thoughts as to what I can do to fix that?

Could you send me the installer for g5_hydrogen to test in my sandbox? 

Soon I will publish J!Research 3.1. I will focus my efforts in making sure the upgrade from Joomla! 2.5 works. I will keep you posted.

Best,
Luis

--
You received this message because you are subscribed to the Google Groups "J!Research Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jresearch-supp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

M. A.

unread,
Feb 23, 2016, 6:08:18 PM2/23/16
to J!Research Support, gala...@luisgalarraga.de
Sorry, somehow missed this email.

I just realized that filter_search is not working for me in the staff backend or the publications frontend. http://ww2.mgh-ita.org

I'm trying to backtrack through the changes I made that might have caused it. Do you have any hints as to where I should look? The jresearch_search plugin is turned on.
joomla-tpl_g5_hydrogen_v5.1.5.zip

Luis Galárraga

unread,
Feb 24, 2016, 12:04:21 AM2/24/16
to jresearc...@googlegroups.com
Hi,

I could not reproduce the problem in the backend, but yes in the frontend.

Change line 125 in file components/com_jresearch/models/publications.php from

 $filter_search = $db->getEscaped($filter_search);

to

 $filter_search = $db->escape($filter_search);

Still I do not understand why your website rewrites the menu configuration and "forgets" about the disabled filters. I will further investigate the issue.

Best,
Luis

M. A. Ladd

unread,
Feb 24, 2016, 4:14:21 PM2/24/16
to jresearc...@googlegroups.com
It was line 113 in the file I have (JResearch 3.0 Stable).

When it searches, does it take titles into account? I can find words, but it is having a hard time with acronyms. 

thanks!

M. A. 

M. A. Ladd 
Harbor to the Bay

Luis Galárraga

unread,
Feb 28, 2016, 2:44:47 PM2/28/16
to jresearc...@googlegroups.com
Hi,

If the acronyms are separated by periods, there will be a problem because text indexes consider the period as a stop word. I need to think of a way to circumvent this issue, maybe by dropping text indexes on the title.

Best,
Luis

M. A. Ladd

unread,
Feb 28, 2016, 3:17:09 PM2/28/16
to jresearc...@googlegroups.com
They are not. It seems words in titles are not being picked up. I have previously sent a bibtex file. If you go to ww2.mgh-ita.org, and search within my pubs for ACR or screening (title words), nothing is found. 

Luis Galárraga

unread,
Feb 28, 2016, 11:46:10 PM2/28/16
to jresearc...@googlegroups.com
Hi,

It is strange. Could you send me (offline) your file components/com_jresearch/models/publications/publications.php and the definition of the publications table?

Best,
Luis

Luis Galárraga

unread,
Feb 29, 2016, 6:47:06 PM2/29/16
to jresearc...@googlegroups.com
Hi,

ACR may not be found due to the minimum word size limit imposed by MySQL in fulltext searches: http://www.electrictoolbox.com/mysql-full-text-index-word-length/. This number is 4, which means shorter words are not indexed. I tried with "screening" and it works though.

Acronyms with periods can be problematic too as the period is considered a word separator, so it is ignored. This means that for MySQL, the acronym O.T.A.N consists of 4 words of size 1 which are not indexed.

I can circumvent these issues for the title by not using the full text indexes, but regex instead http://dev.mysql.com/doc/refman/5.7/en/regexp.html. This is however way less efficient. Even if I sent you the hack, you will have to take care of not overriding this change with every update. I am considering to add a configuration option so that the user can select the type of search. It will be something such as "Standard and efficient" vs "Exhaustive and bit more expensive".  What do you think?

I also need to check why the search does not retain the template configuration in your website. I installed the gantry5 theme but I have not been able to reproduce the issue in my development box.

Best,
Luis

M. A. Ladd

unread,
Feb 29, 2016, 7:10:43 PM2/29/16
to jresearc...@googlegroups.com
Interesting, Searching the term Screening doesn't work on my behind the firewall mock-up site, but today, it works on ww2. What is also weird is I can search for ACR in Joomla's general search and get results, but not in Publications.

On Hydrogen, Do you have a home page set up to use the Hydrogen Home template and other pages using Hydrogen default? And is Hydrogen Default the default template of the site?

Luis Galárraga

unread,
Feb 29, 2016, 7:23:36 PM2/29/16
to jresearc...@googlegroups.com
Hi,


Interesting, Searching the term Screening doesn't work on my behind the firewall mock-up site, but today, it works on ww2. What is also weird is I can search for ACR in Joomla's general search and get results, but not in Publications.

I checked the code and the J!Research search plugin has a more sophisticated implementation depending on the type of search, i.e., 'exact', 'all' or 'any'. Does the search plugin find publications matching 'ACR' in the title? Do you know which mode was used?


On Hydrogen, Do you have a home page set up to use the Hydrogen Home template and other pages using Hydrogen default? And is Hydrogen Default the default template of the site?

I think so, have a look at the screen-shots. I am not familiar with this extension though, so it took me a while to understand how it works.

Best,
Luis 
Screenshot from 2016-02-29 20:21:29.png
Screenshot from 2016-02-29 20:21:36.png

M. A. Ladd

unread,
Feb 29, 2016, 7:48:06 PM2/29/16
to jresearc...@googlegroups.com
Scratch that, it was not finding ACR in publications. It was finding it everywhere else.

The image I've attached shows my Hydrogen set up. Hydrogen Home is where my Home page lives. Hydrogen StaffPgs displays my Staff and Publications pages and is the default template (as opposed to the one my homepage users). When I do a search in Publications, the results appear using the homepage template. 

Even if I set the site to only use one template, the extra search filters appear. I've attached two more images. 1 is how my page appears before a search and the second after. 

Did my models/publications/publications.php file look different than the one you are using? 

Inline image 1
2-ITAPubspagepostsearch.png
1-ITAPubspage.png

Luis Galárraga

unread,
Feb 29, 2016, 7:57:53 PM2/29/16
to jresearc...@googlegroups.com
Did my models/publications/publications.php file look different than the one you are using?

Yes, but in nothing that could affect the search.

Even if I set the site to only use one template, the extra search filters appear. I've attached two more images. 1 is how my page appears before a search and the second after.

I saw it in your live site too. I have no clue why Joomla! is forgetting the configuration in your website. One solution could be that you send a backup of your mock website (using Akeeba Backup for instance) and I try and debug it in my box.

By the way, which versions of PHP and Apache are you using?

Best,
Luis
 

M. A. Ladd

unread,
Mar 1, 2016, 12:16:29 AM3/1/16
to jresearc...@googlegroups.com
I am using PHP 5.4.16 on the future live site and I'm not sure of the Apache version. 

Luis Galárraga

unread,
Mar 1, 2016, 10:19:08 AM3/1/16
to jresearc...@googlegroups.com
This version looks fine to me. Versions older than 5.3 can be problematic.

Could you then send me an Akeeba backup of your mock website where these issues occur?

Best,
Luis

M. A. Ladd

unread,
Mar 9, 2016, 8:22:04 AM3/9/16
to jresearc...@googlegroups.com
Interestingly enough, sh404sef seems to have solved my search filter falling apart thing. I used the sef_ext files included in an earlier version of jresearch.

One slight oddity with it was I had to create an SEF url for Publications (otherwise, it just returned to the home page). 

M. A. Ladd 
Harbor to the Bay


Luis Galárraga

unread,
Mar 9, 2016, 10:48:58 AM3/9/16
to jresearc...@googlegroups.com
I am glad to read that. I am sorry for not having replied. I have been overwhelmed this week. Is there anything else I should check? I have addressed the issues regarding the security reports, that is, I am enforcing data types when looking up arguments in the request, plus we stopped using the deprecated function JRequest::getVar. Thanks for your reports!

Best,
Luis
Reply all
Reply to author
Forward
0 new messages