solved Home Page Latest Forum URLs - all broken

Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
If you take a close look at the screen shot - the URL at the very bottom of the page - you will see that it's routed to the member forum, not the site-wide forum owner, which is me.

http://www.thechocolatelife.com/michele-williams/forums/14649/tech-help-tips-tricks-techniques/tempering-chocolate#last

The URLs are correct when I go to the Forums page and they are correct in the Activity Timeline. They are just wrong in the Latest Forums Post box.

This is a problem as you might imagine and, again, I have no idea what might have caused the change in behavior since last night.

One thing I did notice that may or may not be related. When I woke up this morning the Private Notes function was missing from the top nav! I went into the Quota Config and it was set properly there, but I went in and re-applied the quota config settings and it reappeared. This is not the first time this has happened but before I was willing to believe it was because I wasn't paying attention to the quota settings.

I did disable and re-enable the " Allow Profile Forum " capability in the jrForum quota config but this did not address the problem. What I did notice was that when this was off, no Forum posts from members were visible on the home page. I turned it back on and the Forum posts reappeared on the home page, but the URLs were still wrong.

I did not do anything in any of the related template files last night to mess with the URLs this way. I did add some sub-menus to items in the top nav (hover over pages, for example) but I can't see how this would affect what's being displayed in the Latest Profile Forums content block.
jpg
 •  261KB


updated by @claygordon: 03/08/15 04:52:31PM
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
More troubleshooting info:

Module URL was changed to " forums " for consistency yesterday as part of a larger discussion on where pages get their names

Skin global config forums URL was changed to http://www.thechocolatelife.com/clay/forums

Skin global config media require images is off.
douglas
@douglas
9 years ago
2,790 posts
Are you using the Site Builder or is this just a cloned and modified Ningja skin?

Can you show us the code you have for your latest forum topics?


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
Douglas -

This is NOT using Site Builder and it is a modified version of Ningja skin.

Please note that I was having a similar URL problem a couple of days ago with some URLs in the Activity timeline being badly formed. Brian did something to fix some of them (somewhere in my code I think), but said that a proper long-term fix would require a module update.

The code samples below were modified by me and by Paul during my push in early January to get the site live. They probably need to be cleaned up and I am thinking of going back to adding the scroll and pager. This might be the right time to do that.

I did not modify either of the following blocks of code yesterday.

Part 1 -- index.tpl Embedded Template
{* LATEST FORUM POSTS BLOCK START *}
{* This is the embedded template that is shown for EACH Latest Forum Posts *}
{if isset($_conf.nsTCLSkin1_top_discuss_active) && $_conf.nsTCLSkin1_top_discuss_active == 'on'}
{capture name="template3" assign="forum_tpl"}
{literal}
    {if isset($_items)}
        {jrCore_module_url module="jrForum" assign="furl"}
        {foreach from=$_items item="item"}
            <div class="container">
                <div class="row">
                    <div class="col2" style="padding-bottom: 12px;">
                        <a href="{$jamroom_url}/{$item.profile_url}">{jrCore_module_function function="jrImage_display" module="jrUser" type="user_image" item_id=$item._user_id size="large" crop="auto" alt=$item.user_name width=false height=false class="iloutline img_scale"}</a><br>
                    </div>
                    <div class="col10 last">
                        <div class="p5" style="padding-top: 0px;">
                            {* <h3><a href="{$jamroom_url}/{$item.forum_updated_profile_url}/{$furl}/{$item._item_id}/{$item.forum_cat_url}/{$item.forum_title_url}#last">{$item.forum_title|truncate:60}</a></h3> *}
                            <h3><a href="{$jamroom_url}/{$item.profile_url}/{$furl}/{$item._item_id}/{$item.forum_cat_url}/{$item.forum_title_url}#last">{$item.forum_title|truncate:60}</a></h3>
                            <div class="normal" style="line-height: 15px;">
                                <strong>{jrCore_lang skin=$_conf.jrCore_active_skin id="45" default="Posted"}:</strong>&nbsp;{$item.forum_updated|jrCore_date_format:"%A %B %e %Y, %l:%M %p"}<br>
                                <strong>Last updated {jrCore_lang skin=$_conf.jrCore_active_skin id="46" default="By"}:</strong>&nbsp;<a href="{$jamroom_url}/{$item.forum_updated_profile_url}">@{$item.forum_updated_user_name}</a><br>
                                <strong>In: <a href="{$jamroom_url}/{$item.profile_url}/{$furl}/{$item.forum_cat_url}">{$item.forum_cat}</a></strong><br><br>
                                {$item.forum_text|strip_tags|truncate:200:"..."}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        {/foreach}
    {else}
    <div class="center p10">
        <h3>{jrCore_lang skin=$_conf.jrCore_active_skin id="26" default="No"} {jrCore_lang skin=$_conf.jrCore_active_skin id="19" default="Discussions"}!</h3>
    </div>
    {/if}
{/literal}
{/capture}
{/if}
{* This is the END of the embedded template that is shown for EACH Latest Forum Posts entry *}


Part 2 -- index.tpl Code that generates the content block
{* BEGIN LATEST FORUM POSTS *}
{if isset($_conf.nsTCLSkin1_top_discuss_active) && $_conf.nsTCLSkin1_top_discuss_active == 'on'}
    {if isset($_conf.nsTCLSkin1_top_discuss_limit) && $_conf.nsTCLSkin1_top_discuss_limit > 5}
    {assign var="post_pb" value=$_conf.nsTCLSkin1_top_discuss_limit}
    {else}
        {assign var="post_pb" value="5"}
    {/if}
    <div class="col8">
        <div class="item blog-archive-header m10">
            <h2>{jrCore_lang skin=$_conf.jrCore_active_skin id="20" default="Latest"} {jrCore_lang skin=$_conf.jrCore_active_skin id="47" default="Forum"} {jrCore_lang skin=$_conf.jrCore_active_skin id="48" default="Posts"}{if strlen($_conf.nsTCLSkin1_forum_profile) > 0} &nbsp; <span class="normal"><a href="{$_conf.nsTCLSkin1_forum_profile}/new_posts">{jrCore_lang skin=$_conf.jrCore_active_skin id="30" default="All"}</a></span>{/if}</h2>
        </div>
        <div class="blog-index-text" style="height:636px; margin: 10px 10px 0px 10px; padding-bottom: 10px;">
            {jrCore_list module="jrForum" search="forum_post_count > 0" order_by="forum_updated desc" template=$forum_tpl pagebreak=$post_pb page=$_post.p}
        </div>
    </div>
{/if}
{* END LATEST FORUM POSTS *}
douglas
@douglas
9 years ago
2,790 posts
Yes, there is a fix for this already but the new version has not been released yet.

This is the code being used now in the index.tpl file for Ningja.

    {* This is the embedded template that is shown for EACH Latest Forum Posts entry on the right side *}
    {if isset($_conf.jrNingja_top_discuss_active) && $_conf.jrNingja_top_discuss_active == 'on'}
        {capture name="template3" assign="forum_tpl"}
        {literal}
            {if isset($_items)}
            {jrCore_module_url module="jrForum" assign="furl"}
            {foreach from=$_items item="item"}
            <div class="container">
                <div class="row">
                    <div class="col12 last">
                        <div class="p5">
                            {if jrCore_checktype($_conf['jrNingja_forum_profile'], 'url')}
                            {if isset($item.forum_cat_url)}
                            <h3><a href="{$_conf.jrNingja_forum_profile}/{$item.forum_cat_url}/{$item._item_id}/{$item.forum_title_url}#last">{$item.forum_title|truncate:30}</a></h3>
                            {else}
                            <h3><a href="{$_conf.jrNingja_forum_profile}/{$item._item_id}/{$item.forum_title_url}#last">{$item.forum_title|truncate:30}</a></h3>
                            {/if}
                            {else}
                            {if isset($item.forum_cat_url)}
                            <h3><a href="{$jamroom_url}/{$item.profile_url}/{$furl}/{$item.forum_cat_url}/{$item._item_id}/{$item.forum_title_url}#last">{$item.forum_title|truncate:30}</a></h3>
                            {else}
                            <h3><a href="{$jamroom_url}/{$item.profile_url}/{$furl}/{$item._item_id}/{$item.forum_title_url}#last">{$item.forum_title|truncate:30}</a></h3>
                            {/if}
                            {/if}
                            <div class="normal" style="line-height: 12px;">
                                <strong>{jrCore_lang skin=$_conf.jrCore_active_skin id="45" default="Posted"}:</strong>&nbsp;{$item.forum_updated|jrCore_date_format:"%A %B %e %Y, %l:%M %p"}<br>
                                <strong>{jrCore_lang skin=$_conf.jrCore_active_skin id="46" default="By"}:</strong>&nbsp;<a href="{$jamroom_url}/{$item.forum_updated_profile_url}">@{$item.forum_updated_user_name}</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            {/foreach}
            {else}
            <div class="center p10">
                <h3>{jrCore_lang skin=$_conf.jrCore_active_skin id="26" default="No"} {jrCore_lang skin=$_conf.jrCore_active_skin id="19" default="Discussions"}!</h3>
            </div>
            {/if}
        {/literal}
        {/capture}
    {/if}
    {* This is the END of the embedded template that is shown for EACH Top Disscusstion entry on the right side *}




--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
Apart from changing all of the skin references (jrNingja ==> my skin name) what are the differences between what you sent and what I am using? I can see them at a casual glance.

--- edited to add ---

I just downloaded a new diff/merge utility and I can see the differences - and they are considerable.

What I am going to do is replace my current code with the ningja skin code and then go back and add changes one at a time to get the custom functionality I added.
updated by @claygordon: 02/04/15 08:22:40AM
douglas
@douglas
9 years ago
2,790 posts
Basically its the links that were changed...

{if jrCore_checktype($_conf['jrNingja_forum_profile'], 'url')}
    {if isset($item.forum_cat_url)}
        <h3><a href="{$_conf.jrNingja_forum_profile}/{$item.forum_cat_url}/{$item._item_id}/{$item.forum_title_url}#last">{$item.forum_title|truncate:30}</a></h3>
    {else}
        <h3><a href="{$_conf.jrNingja_forum_profile}/{$item._item_id}/{$item.forum_title_url}#last">{$item.forum_title|truncate:30}</a></h3>
    {/if}
{else}
    {if isset($item.forum_cat_url)}
        <h3><a href="{$jamroom_url}/{$item.profile_url}/{$furl}/{$item.forum_cat_url}/{$item._item_id}/{$item.forum_title_url}#last">{$item.forum_title|truncate:30}</a></h3>
    {else}
        <h3><a href="{$jamroom_url}/{$item.profile_url}/{$furl}/{$item._item_id}/{$item.forum_title_url}#last">{$item.forum_title|truncate:30}</a></h3>
    {/if}
{/if}



--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
Douglas -

It didn't take too long to merge the above changes into my current working code. All the URLs are now working correctly.

I have to reiterate two requests I've made in the past month to help us understand when changes to a core skin might affect changes we've made in a clone skin:

1) The changelog for a module/skin update should indicate which templates were affected, if any, so we know what we need to compare against to see the diffs.

2) There needs to be a way to review the change logs after we've performed the update so we can refer to specific changes after the item has been installed.

I wonder how many of the other issues I've been having are because I don't know how a module update might affect a template I've edited. Frankly, it's not feasible to compare every template to see if there might be any changes we need to know about.
douglas
@douglas
9 years ago
2,790 posts
The changelog does say what was modified, it just doesn't tell you what templates were modified. You should be able to figure out what templates by what was done, then you just have to use the compare tool to find the changes.

I use to add the templates in the changelog, I guess I could start doing it again.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
Douglas:

If I was a coder for a living, then "being able to figure out what templates (were modified by what was done) might be a trivial task.

But I am not. I actually think I am fairly representative of most Ningsters. We know some CSS, we know some HTML, we'd prefer not to have to dive into PHP as it's really not a core competency.

You live and breathe this stuff every day. I don't want to. I make stupid mistakes and I want stuff spelled out for me so maybe I will make fewer stupid mistakes.
brian
@brian
9 years ago
10,148 posts
thechocolatelife:
1) The changelog for a module/skin update should indicate which templates were affected, if any, so we know what we need to compare against to see the diffs.

I think the changelog is a poor place for this, as it's created by us and it is easy to forget to do it. Anything that requires people "remembering" is prone to not always working right.

A better solution is in the Templates area of Jamroom. I'm thinking in the templates list someway to highlight and say "compared to the last version that was installed, this template is different". Right now you can just click on "compare" for each template and you'll see if there are any changes, but I understand that is a bit of a pain, so maybe some way to visually flag the templates in the template list would be better.

I think that would lead to a more solid long term solution.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
Brian -

I agree. It occurred to me, but I hesitated to suggest a programmatic solution.

I don't even need to have it on the template page. How about making it work like integrity check and put up a list that compares the working version of module templates against the archive version and the templates in the current skin against the latest updated version? If the two are different then use the red ball symbol. If they are the same, use the green one.

Users can cut and paste the contents of that window into a document for reference - and then keep their own changelogs. That's what I would do - use the list as a framework for keeping track of the changes I make from update to update.

--- edited to fix grammar and typos --
updated by @claygordon: 02/04/15 05:41:45PM
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
+1 to everything Clay described. It'd be very very helpful to be able to 'compare' and visually have indicated what the NEW changes are, so we dont have to keep reviewing (and remembering!) every single change to our cloned skin that we've ever made, every time and update comes along. I'm losing brains cells every day after all!


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
brian
@brian
9 years ago
10,148 posts
Per the original issue in this thread (bad forum URLs in activity updates) this should now be fixed in Profile Forum 1.5.1.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
Brian -

Thanks for the update on this and the patience all the way around with my not-improving-rapidly-enough-for-me coding skills.

What I do appreciate is the back and forth that enables me learn how and where to look for potential answers. The "Order By Last ..." thread that I just closed is good example of that.

https://www.jamroom.net/the-jamroom-network/forum/23970/order-by-last-updated-new-comment-on-group-discussions#last

It was as I was composing a reply that I did a very close inspection of the code and realized where the problem was, a simple syntax error. Something someone more experienced would probably have noticed right away, but it escaped me completely.

Tags