Hi there, I've been able to create a taxonomy view that displays the terms of a vocabulary with an alphabetical pager (attachment) (http://drupal.org/node/1110944#comment-7226414), I've created a page and a block doing the same task, just in case, this works perfectly well. The issue I have is because I'm on an OG environment with each group having its own theme and blocks, different from the site default ones. Well, if I set the page view at my desired group (with its own theme), through a minipanel, it shows the content of the view but when clicking any of the letters it comes the problem, if I have Ajax enabled the view does not work, I mean it does nothing, and if I disable Ajax, it works but sending me to a site's default theme page were it shows the good results.

In the case of the block view, enabled for the theme of the group I need, the behaviour is more or less the same, being the difference that if disable Ajax for the block it sends me to starting page of the site in its default theme (not the OG where it is the block), I mean it does not even give me the right results, which are given if I try the block view from the preview in the view's setting.

I would appreciate any advise, or derivation to any documentation.

Thanks a lot.

Comments

Andrés Chandía’s picture

I've tested it in a panel instead of a minipanel, I mean creating a node instead of block and it happens the same......

bburg’s picture

I take it you are trying to display a glossary view in in a panel page? I'm not in an OG environment, but I am also having some trouble with this as well. Checking "Use Panel path" in the primary display's pane settings gets me part of the way there but then my options are to:

1, Don't use ajax, then the letter filter just appends any new arguments to the current url, resulting in a page that continues to load the first picked argument since that remains in the detected position for the contextual filter.

2, Use ajax, but then only the first attempt to filter is recognized and any subsequent selections do not update the view contents.

I pulled up the old Chrome Network analyzer to watch the ajax requests as they are being made, it looks like every one is being sent with the same, original selection. So perhaps a bug in the views js? Taking a closer look at the markup of my view compared to the example pre-packaged "Glossary" view, I notice that the glossary views are being rendered with proper paths in the href attribute while the items in my view are not... fixed this in the contextual filter options by adding a "Base URL." This corrected the markup for the href's but no luck in solving the actual, original problem.

Will update here if I come across any solutions, but I'm still not entirely sure we are having the same problem here.

Andrés Chandía’s picture

Thanks for the time you've taken to investigate this issue, I will centainly follow your improvements, in the meantime I've come accross with another solution, based on an external page:

I've created a subdirectory in the libraries directory called tnt/, there i put next php files:
en_indexTrans.php:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//CA"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
    <title>Alphabetic Translators List</title>
    <meta author:Andrés Chandía - andres[.\.@.\.]chandia[.]net>
     <frameset rows="24%,*" border="0" scrolling="no">
                <frame name="alphabet" scrolling="no" src="alphaTrans.php">
                <frame name="translator" scrolling="auto" src="translators.php">
     </frameset>
  </head>
  <body id="top">
  </body>
</html>

en_alphaTrans.php:

</head>
</script>
    <style type="text/css">
        <!--
        A:link {text-decoration: none} A:visited {text-decoration: none}
        A:active {text-decoration: none}
        -->
    </style>
</head>
<body>
<center>
<?php
include 'acces.php'; //database connection
$db_table = 'taxonomy_term_data';
$query = "SELECT SUBSTRING(taxonomy_term_data.name, 1, 1) AS name_truncated FROM {$db_table} WHERE vid=14 GROUP BY name_truncated ORDER BY name";

// sending query
$result = mysql_query($query);
if (!$result) {
    die("Query to show fields from table failed");
}
$fields_num = mysql_num_fields($result);
while($row = mysql_fetch_array($result)){
echo "<a target=translator href=en_translators.php?letter=".$row['name_truncated']."><font size=2 face=arial color=#cb6806>".$row['name_truncated']."</a> | </font>";
}
mysql_free_result($result);
?>
</center>
</body>

en_translators.php:

</head>
</script>
    <style type="text/css">
        <!--
        A:link {text-decoration: none} A:visited {text-decoration: none}
        A:active {text-decoration: none}
        -->
    </style>
</head>
<?php
include 'acces.php'; //database connection
$db_table = 'taxonomy_term_data';

$letter=$_GET['letter'];
$query = "SELECT * FROM {$db_table} WHERE vid=14 AND name LIKE '$letter%' GROUP BY name";

// sending query
$result = mysql_query($query);
if (!$result) {
    die("Query to show fields from table failed");
}
$fields_num = mysql_num_fields($result);
while($row = mysql_fetch_array($result)){
echo "<li><a target=_top same href=/en/content/translations?field_translator_tid=".$row['tid']."><font size=2 face=arial color=#cb6806>".$row['name']."</font></a></li>";
}
mysql_free_result($result);
?>

acces.php:

<?php
$db_host = 'localhost';
$db_user = 'dbuser';
$db_pwd = 'dbpassword';
$database = 'dbname';

//Data Base connection 

$link = mysql_connect($db_host, $db_user, $db_pwd);
mysql_select_db($database);

if (!$link)
    die("Can't connect to database");

if (!mysql_select_db($database))
    die("Can't select database");

mysql_set_charset('utf8',$link);

//URL Base
$base_url = 'http://www.exemple.com';

//PHP Configuration
ini_set('arg_separator.output',     '&amp;');
ini_set('magic_quotes_runtime',     0);
ini_set('magic_quotes_sybase',      0);
ini_set('session.cache_expire',     200000);
ini_set('session.cache_limiter',    'none');
ini_set('session.cookie_lifetime',  2000000);
ini_set('session.gc_maxlifetime',   200000);
ini_set('session.save_handler',     'user');
ini_set('session.use_only_cookies', 1);
ini_set('session.use_trans_sid',    0);
ini_set('url_rewriter.tags',        '');

//Cookie
$cookie_domain = 'exemple.com';
?>

* The prefix en_ at every file is because I had to create a file per language.

Then I created a block that contains an iframe:
<p><iframe frameborder="0" src="/sites/all/libraries/TnT/en_indexTrans.php" width="100%"></iframe></p>

you can see this working at: http://parles.upf.edu/en/content/translators-translations

Andrés Chandía’s picture

Issue summary: View changes

giving some more info

MustangGB’s picture

Priority: Major » Normal
Issue summary: View changes
Andrés Chandía’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.