Hi Travis, I’m also getting the red ERROR message appear when trying to reorder pages as well. I’m on EE 1.6.7, Structure 1.2.7, your jQuery extension 1.1.2. Other than that I’m on a clean install, and don’t have masked CP or versioning enabled. Any ideas? Thanks in advance, Paul.
I am also having the issue, same specs as above. I did however replace the pages module, not sure if thats effecting it. But I can’t get my URL’s straight and I believe it has to do with this issue.
Thanks, any advise will help!!! My manuals are down :(
Just an update,
Everything is working properly, I sorted out the URL problem I was having. I still get the red Error when moving pages up and down in the CP but the order still works.
This is only happening on installs that were upgraded from the Pages module. On my installs that never used the pages module I do not get any errors.
Hi All… just came across an issue with the Structure module. Firstly, let me just say that the module rocks, and I use it now as standard on most EE sites I build.
The issue is around the Pagination function and Categories. The Pageination function actually seems to ignore the category parameter of the “weblog:entries” tag. The reason for this is the “Limit on category or category_group” section (around line 1218 of mod.structure.php).
This section adds “joins” into the for the categories table, but doesn’t actually do any limiting in the “WHERE” bit of the SQL. It needs to be updated to something like this (but this isn’t quite right!)…
// Limit on category or category_group
if($params['category'] || $params['category_group']) {
if((substr($params['category_group'], 0, 3) == 'not' OR substr($params['category'], 0, 3) == 'not') && $params['uncategorized_entries'] !== 'n') {
$sql .= " LEFT JOIN " . $db_prefix . "_category_posts ON entries.entry_id = " . $db_prefix . "_category_posts.entry_id
LEFT JOIN " . $db_prefix . "_categories ON " . $db_prefix . "_category_posts.cat_id = " . $db_prefix . "_categories.cat_id";
$where_clause .= " AND " . $db_prefix . "_categories.cat_id = ".$params['category']." ";
} else {
$sql .= " INNER JOIN " . $db_prefix . "_category_posts ON entries.entry_id = " . $db_prefix . "_category_posts.entry_id
INNER JOIN " . $db_prefix . "_categories ON " . $db_prefix . "_category_posts.cat_id = " . $db_prefix . "_categories.cat_id";
}
$where_clause .= " AND " . $db_prefix . "_categories.cat_id = ".$params['category']." ";
}
The “$where_clause” part is missing from the official release (again, my version isn’t quite right!!).
Just one other thing… the Pagination function doesn’t respect the {no_results} weblog tag as well. Not sure how to fix this one!
Cheers.
Andrew…
Hey! Thanks for the module! I am having a problem with pagination. When I click the next button, the URL changes properly, but my list doesn’t show the next batch of items. I did find, however that if I add index.php directly after the site_url, it works (i.e. www.mysite.com/index.php/news/?page=2).
Hello,
Im having problems with exp:structure:nav_main tag. It wont show the defined sublevels in navigation.
The code I use:
{exp:structure:nav_main show_level_classes="yes" exclude_status="hidden|no_main_nav"}
I want to output all levels of navigation (similar as sitemap). Is it possible to do that with some of the tags and still have ‘here’ class on the active page?
Any idea? Thanks for help!
First off, thanks for the great module.
I am having trouble trying to set the “start_from” param for the nav_sub tag to the current page’s parent. Basically I want to always start the sub_nav one level up from where I am currently at in the structure.
I am trying to use the code below without any luck. It looks like the structure tag is parsed before the PHP or something. Is there another way to get what I need with purely structure module tags? Any help would be greatly appreciated, thanks.
<?php
// get uri
$uriArray = explode('/', $_SERVER['REQUEST_URI']);
// lop off last uri segment
$uriArray = array_slice($uriArray, 0, (sizeof($uriArray) - 2));
// convert back to string
$uriString = implode('/', $uriArray);
//echo $uriString;
?>
<div id="page-sidebar">
{exp:structure:nav_sub start_from="<?php echo $uriString; ?>"}
</div>
First off, thanks for the great module. I am having trouble trying to set the “start_from” param for the nav_sub tag to the current page’s parent. Basically I want to always start the sub_nav one level up from where I am currently at in the structure. I am trying to use the code below without any luck. It looks like the structure tag is parsed before the PHP or something. Is there another way to get what I need with purely structure module tags? Any help would be greatly appreciated, thanks.<?php // get uri $uriArray = explode('/', $_SERVER['REQUEST_URI']); // lop off last uri segment $uriArray = array_slice($uriArray, 0, (sizeof($uriArray) - 2)); // convert back to string $uriString = implode('/', $uriArray); //echo $uriString; ?> <div id="page-sidebar"> {exp:structure:nav_sub start_from="<?php echo $uriString; ?>"} </div>
Use {segment_1}, {segment_2}, etc. instead of php code.
Edit: Whoops, found a bug in my bugfix. Fixed now.
Found a bug in the pagination function. The ‘show_expired’ SQL clause is the wrong way.
Lines 997-1000 of mod.structure.php:
// Limit by show_expired
if(!$params['show_expired'] || $params['show_expired'] == 'no') {
$where_clause .= " AND (FROM_UNIXTIME(entries.expiration_date) > UTC_TIMESTAMP() OR entries.expiration_date = 0)";
}
Another fix that may have come up earlier from the pagination. Around line 1067 (right after the
(if ($params['status'])
bit), add the following:
else {
$where_clause .= " AND entries.status IN ('open')";
}
otherwise if you don’t have a status it select everything (even closed). As well, Travis, I’ve gotten “display_by” support hacked into the pagination stuff for Structure, although you have to be a bit specific in your exp:weblog:entries parameters (due to EE limitations). PM me if you’d like the code - it’s a bit too large to post here.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.