From: Barnett, J. <jef...@ya...> - 2009-11-17 21:20:05
|
I think you have narrowed the field quite well, but I've gone way over my allotted time this week for vufind work. Maybe others on the list would like to look further. (or at least check their own pager values). -----Original Message----- From: Demian Katz [mailto:dem...@vi...] Sent: Tuesday, November 17, 2009 4:05 PM To: Barnett, Jeffrey Subject: RE: Can't turn pages Well, here's the constant-definition code I was talking about from the PEAR library... the values here seem to affect _url later on. /** * Two constants used to guess the path- and file-name of the page * when the user doesn't set any other value */ if (substr($_SERVER['PHP_SELF'], -1) == '/') { $http = (isset($_SERVER['HTTPS']) && ('on' == strtolower($_SERVER['HTTPS']))) ? 'https://' : 'http://'; define('PAGER_CURRENT_FILENAME', ''); define('PAGER_CURRENT_PATHNAME', $http.$_SERVER['HTTP_HOST'].str_replace('\\', '/', $_SERVER['PHP_SELF'])); } else { define('PAGER_CURRENT_FILENAME', preg_replace('/(.*)\?.*/', '\\1', basename($_SERVER['PHP_SELF']))); define('PAGER_CURRENT_PATHNAME', str_replace('\\', '/', dirname($_SERVER['PHP_SELF']))); } It might be interesting to create a dummy VuFind page in both of your installations to runs this code and echo out the constants to see if that offers any clues. Also, later in the PEAR code, here's how the constants are used to define _url: if ($this->_append) { if ($this->_fixFileName) { $this->_fileName = PAGER_CURRENT_FILENAME; //avoid possible user error; } $this->_url = $this->_path.(empty($this->_path) ? '' : '/').$this->_fileName; } else { $this->_url = $this->_path; if (0 != strncasecmp($this->_fileName, 'javascript', 10)) { $this->_url .= (empty($this->_path) ? '' : '/'); } if (false === strpos($this->_fileName, '%d')) { trigger_error($this->errorMessage(ERROR_PAGER_INVALID_USAGE), E_USER_WARNING); } } if (substr($this->_url, 0, 2) == '//') { $this->_url = substr($this->_url, 1); } I'm not really sure what the significance of any of that is... but it seems like it might be the area to study more closely. If that's all too complicated, it might even be informative to compare dumps of the $_SERVER array between the two installs. But on the other hand, it's entirely possible I'm pursuing a false lead and the problem is coming from somewhere else entirely. - Demian > -----Original Message----- > From: Barnett, Jeffrey [mailto:jef...@ya...] > Sent: Tuesday, November 17, 2009 4:01 PM > To: Demian Katz > Subject: RE: Can't turn pages > > That's a good suggestion too. For the time being, closing and > reopening the browser made the Debug window come back. As you > surmised, the "good" RC1 dump has "good" pager links and a good _url. > > ->links = "<span>1</span><a href="http://halley...." > ->linkTags = "<link rel="next" href="http://halley...." > ->_url = "http://halley.library.yale.edu/yufind/" > > But why? > > -----Original Message----- > From: Demian Katz [mailto:dem...@vi...] > Sent: Tuesday, November 17, 2009 3:55 PM > To: Barnett, Jeffrey > Subject: RE: Can't turn pages > > Perhaps you can use a boolean OR in your test query to get a large > result set without entering a query that any real user would be likely > to try... i.e.: > > a* OR obscure_junk > > I'm not sure why {debug} would fail to give you any output... though > I've never tried it in RC1, so maybe there's a problem I'm unaware of. > > If you want a sanity check that you're editing the right template file, > you can always put in an <!-- HTML comment --> somewhere and then view > source to be sure that it shows up. It might also be worth clearing > the Smarty cache/compile folders to be sure those aren't interfering > with your changes, though I doubt this is the case. > > Anyway, good luck -- I'm about to head home for the day, but I can > offer more suggestions tomorrow morning if you're still having trouble > at that point. Just let me know. > > - Demian > > > -----Original Message----- > > From: Barnett, Jeffrey [mailto:jef...@ya...] > > Sent: Tuesday, November 17, 2009 3:50 PM > > To: Demian Katz > > Subject: RE: Can't turn pages > > > > I thought it was list.tpl, but when I put it at the top nothing > > happened. > > Actually since we have our own theme, I put it in > > /usr/local/yufind/web/interface/themes/yale/Search/list.tpl. > > The {if} hint is a good one, but it can't be too obscure since I need > > to get multi-page results. Halley is a development machine, even > > though it has a copy of the production (RC1+) code, so top is OK, but > > now I need another hint on why it doesn't pop up a window. > > > > -----Original Message----- > > From: Demian Katz [mailto:dem...@vi...] > > Sent: Tuesday, November 17, 2009 3:32 PM > > To: Barnett, Jeffrey > > Subject: RE: Can't turn pages > > > > When I did my debugging, I put the {debug} tag near the top of > > web/interface/themes/classic/Search/list.tpl. I believe the path > > should be the same for RC1 and the current trunk. The tricky part is > > how to debug RC1 without confusing end users if that's your > production > > box. One approach would be to put the {debug} inside an {if} that > > checks for an obscure value in $lookfor... then you can trigger the > > debug pop-up by performing that search, and regular users will never > > see anything odd. > > > > - Demian > > |