ExpressionEngine 7.5 has been Released! Learn More!
I know I can disable it - but I and my client ACTUALLY like quick save. I know a lot of people can’t stand it, but I don’t understand why. If you’re working on a draft, and you have a big content area with a lot of HTML or Textile formatting - it allows you to make incremental tweaks and keeps you right there, on the entry, to keep tweaking. I know it’s only saving a click each time (after hitting update, you then click on “Edit this Entry” on the next screen…) but I find saving a click to be handy and a wee bit faster (because I always have at least two tabs open, or two windows, with the admin area in one, and the live/or dev site in the other). Make a tweak, hit quick save, switch to other window, refresh. Repeat until perfect.
I just think, instead of installing two extensions to make one work right - the one should work right!
ANYWAY - briefly, this extension is also losing settings when another unrelated but required field is not filled in and EE throws an error. So - this doesn’t appear to work with quicksave, and it doesn’t appear to work when EE throws an error (i.e. for a required field).
Questions:
Is anyone else using this, and experiencing these same issues? If you are not using this, how are you managing your relationships? I’d like to get this resolved on some level before going too far along with the build of this site.
Thanks.
Mark & co.,
It’s worth noting that the odd {REL} behavior apparently sometimes happens even if you ARE running PHP 5 – i’m on 5.2.1, and had the same issue.
However, your fix to mod.weblog works for me too! Just thought i’d contribute that you might try the fix even if you’re NOT on PHP 4, if you’re having the issue!
Adrienne Travis
Bug Report:
I have Weblog A (classes) and it relates to Weblog B (teachers).
I deleted a teacher from the weblog “teacher”. This teacher that I deleted was connected to a class in the “classes” weblog. When I listed the class the teacher still showed up even though they had been deleted. I had to go in and do an edit on that class to “break” or remove the linking.
Is there a setting that I need to explore or is this a bug?
I don’t know if this is a bug or something I’m doing wrong, but adding anything to the related_entries tag seems to kill the whole thing.
This works fine:
<ul>{related_entries id="prod_contacts"}
<li>{title}</li>
{/related_entries}</ul>
This returns no results (just the ul tags with nothing between):
<ul>{related_entries id="prod_contacts" order_by="loc_sort|title" sort="asc" status="open"}
<li>{title}</li>
{/related_entries}</ul>
It doesn’t matter which parameters are in there - I’ve tried using only one parameter, only one sort field, etc…any parameters at all mean I get no results.
Hi,
I have a quick question and bug. I, like everyone else, got the weird string bug, but changing the code fixed that until I started working with parameters in the:
{related_entries id="show_images" orderby="random" limit="1"}
Then I get the gibberish again with the parameters in the string. I need to have the client be able to select multiple images but only show one at a time to give a rotating image look every time the page refreshes.
I am assuming that you can not put the parameters in the related entries, but I wasn’t sure of another way to get this to work.
Thanks, Seth
I’m having a hard time linking to related entries. The {url_title} variable doesn’t work for me, presumably because the entries I’m linking to are managed by the Pages extension, so their URLs aren’t standard. For example, the static page
http://site.com/internal/depts/dean/business
is related to the static page
http://site.com/internal/policy/credit
Both are in the same weblog, just in different categories. The trouble is that {url_title} outputs
http://site.com/internal/depts/dean/credit
…when invoked from the “business” page. I tried using {exp:static_page_path}{url_title}{/exp:static_page_path} with the same result.
Any ideas?
Thanks, Ben
I had to resort to PHP to solve the above problem. Here’s how I did it:
First, at the top of the template (probably anywhere outside of the categories tag, actually), I did:
<?php $site_index = '{path=site_index}'; ?>
That’s because inside the categories loop, site_index seems to have a different meaning; it includes the path to the template plus the category link.
Then, to display the related entries with links:
<h3>Multi Relationship Test</h3>
<ul>
{related_entries id="nsite_multi_related_test"}
{categories}
<?php
// this works in part because we know static pages entries
// will be in only one category, so this PHP is executed only once
global $DB;
$cat_tree = '';
$page_cat = '';
$cat_id = {category_id};
$sql = "select cat_description from exp_categories where cat_id=$cat_id";
$query = $DB->query($sql);
$page_cat .= $query->row['cat_description'];
do {
$sql = "select parent.cat_id, parent.cat_description from "
. "exp_categories as parent, exp_categories as child "
. "where child.cat_id=$cat_id and child.parent_id=parent.cat_id";
$query = $DB->query($sql);
if ($query->num_rows == 1) {
$cat_tree = $query->row['cat_description'].'/'.$cat_tree;
$cat_id = $query->row['cat_id'];
}
} while ($query->num_rows == 1);
$cat_tree .= $page_cat;
?><li><a href="http://<?=$site_index.$cat_tree?>">{title}</a></li>
{/categories}
{/related_entries}
</ul>
It’s important (as noted) that static pages only be assigned to a single category. Since that’s the way Pages works by design, I felt I could rely upon it. So inside the {related_entries} tag, I invoke the {categories} tag pair so that I can get at {category_id}. Then I do a database lookup (actually, a bunch of them) to find its parent, then its parent’s parent, etc., until the query returns no results (at the topmost parent). This gives me a string like “root/directory/subdirectory/”, to which I still need to add the page name itself. Well, this is also a category name, but it’s not a parent, so one final DB->query pulls that in and sticks it on the end. This string, appended to the site_index I fetched back at the beginning of the page load, makes the URL I need.
I’m definitely interested in hearing about ways to do this that don’t require so many database calls. This solution requires (n+1)*m calls, where n is the depth of the linked document and m is the number of related documents. So if I have 10 related links, each of which is 4 levels deep in the category hierarchy, I’m looking at 50 database calls just to build this section. Not cool!
Cheers, Ben
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.