CGBlog Category Numbers Instead Of Names In FEU Form Area

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
govicinity
Forum Members
Forum Members
Posts: 125
Joined: Tue Nov 22, 2011 2:22 pm

CGBlog Category Numbers Instead Of Names In FEU Form Area

Post by govicinity »

CMS Made Simple™ 1.11.10 “Pinzon”
CGExtensions 1.42.2
FrontEndUsers 1.24.1
CGSmartImage 1.17
JQueryTools 1.2.6
CGSmartImage 1.17
CGBlog 1.12.6

Hi all, having an issue with CGBlog and my Frontend Article Submission Form Templates.

My template can be seen as an image here Image
You can see my categories are being listed as numbers instead of their names, very odd, it was working before update of CGBlog today, but just updated it to version 1.12.6

Any help appreciated.
Going up, woop, woop.
govicinity
Forum Members
Forum Members
Posts: 125
Joined: Tue Nov 22, 2011 2:22 pm

Re: CGBlog Category Numbers Instead Of Names In FEU Form Are

Post by govicinity »

No takers for this one?

I also forgot to mention that all of the checkboxes for the categories seem to be checked whereas none of them should be checked at all to start with, so that's interesting (well it is to me), so I need to make sure they are not checked by default, and do not have numbers as their names, but actually have the category names instead.
Going up, woop, woop.
stetman
Forum Members
Forum Members
Posts: 20
Joined: Fri Feb 12, 2010 9:39 am

Re: CGBlog Category Numbers Instead Of Names In FEU Form Are

Post by stetman »

I've got exactly the same problem. Already posted it on the forum without any luck so far.
I think the problem is the use of {$name} in the foreach, but don't know the solution.

Hope somebody does
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1976
Joined: Mon Jan 29, 2007 4:47 pm

Re: CGBlog Category Numbers Instead Of Names In FEU Form Are

Post by Jo Morg »

Better than posting an image of the template would be posting the image and the template code. ;)
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
govicinity
Forum Members
Forum Members
Posts: 125
Joined: Tue Nov 22, 2011 2:22 pm

Re: CGBlog Category Numbers Instead Of Names In FEU Form Are

Post by govicinity »

Here's the FEU Form code, pretty much the standard template:

Code: Select all

{* original form template *}
<__script__ type="text/javascript">
{literal}
function toggle_dates()
{
  var elem = document.getElementById('use_expiry');
  if( elem.checked == true )
  {
    document.getElementById('datefields').style.display = 'block';
  }
  else
  {
    document.getElementById('datefields').style.display = 'none';
  }
}
{/literal}
</__script>

{if isset($error)}
  <h3><font color="red">{$error}</font></h3>
{else}
  {if isset($message)}
    <h3>{$message}</h3>
    <p>{$return_link}</p>
  {/if}
{/if}
{if !isset($message)}
<p>List your items for sale here by filling in the details below, be as descriptive as possible. Please note your telephone number and email address will show on the site if you input these.</p>
{$startform}
	<div class="pageoverflow">
		<p class="pagetext">*{$titletext}:</p>
		<p class="pageinput">{$inputtitle}</p>
	</div>
	<div class="pageoverflow">
		<p class="pagetext">{$categorytext}:</p>
		<p class="pageinput">
                  {foreach from=$categorylist item='tmp' key='name'}
                    <input type="checkbox" name="{$actionid}cgblog_category_id[]" value="{$tmp.id}" {if $tmp.selected}checked="checked"{/if}>&nbsp;{$name}<br/>
                  {/foreach}
                </p>
	</div>
{if !isset($hide_summary_field) or $hide_summary_field == 0}
	<div class="pageoverflow">
		<p class="pagetext">{$summarytext}:</p>
		<p class="pageinput">{$inputsummary}</p>
	</div>
{/if}
{if isset($input_status)}
        <div class="pageoverflow">
		<p class="pagetext">{$prompt_status}:</p>
		<p class="pageinput">{$input_status}</p>
        </div>
{/if}
	<div class="pageoverflow">
		<p class="pagetext">*{$contenttext}:</p>
		<p class="pageinput">{$inputcontent}</p>
	</div>

        {if $fesubmit_useexpiry}
	<div class="pageoverflow">
		<p class="pagetext">{$CGBlog->Lang('useexpiration')}:</p>
		<p class="pageinput">
                  <input type="hidden" name="{$actionid}cgblog_usexpiry" value="0"/>
	          <input type="checkbox" id="use_expiry" name="{$actionid}cgblog_usexpiry" value="1" {if $use_expiry == 1}checked="checked"{/if} onclick="toggle_dates();"/>
                </p>
	</div>
        <div id="datefields" {if $use_expiry == 0}style="display: none;"{/if}>
	<div class="pageoverflow">
		<p class="pagetext">{$startdatetext}:</p>
		<p class="pageinput">{html_select_date prefix=$startdateprefix time=$startdate start_year='-10' end_year="+15"} {html_select_time prefix=$startdateprefix time=$startdate}</p>
	</div>
	<div class="pageoverflow">
		<p class="pagetext">{$enddatetext}:</p>
		<p class="pageinput">{html_select_date prefix=$enddateprefix time=$enddate start_year='-10' end_year="+15"} {html_select_time prefix=$enddateprefix time=$enddate}</p>
	</div>
        </div>
        {/if}

	{if isset($customfields)}
	   {foreach from=$customfields item='onefield'}
	      <div class="pageoverflow">
		<p class="pagetext">{$onefield->name}:</p>
		<p class="pageinput">{$onefield->field}</p>
	      </div>
	   {/foreach}
	{/if}
	<div class="pageoverflow">
		<p class="pagetext">&nbsp;</p>
		<p class="pageinput">{$hidden}{$submit}{$cancel}</p>
	</div>
{$endform}
{/if}
Going up, woop, woop.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1976
Joined: Mon Jan 29, 2007 4:47 pm

Re: CGBlog Category Numbers Instead Of Names In FEU Form Are

Post by Jo Morg »

govicinity wrote:You can see my categories are being listed as numbers instead of their names, very odd, it was working before update of CGBlog today, but just updated it to version 1.12.6
govicinity wrote:(...)pretty much the standard template(...)
Yep, so it seems.
Clear CMSMS cache just in case, but it seems it's a bug.
If confirmed, I advise filing a bug report on http://dev.cmsmadesimple.org/bug/list/649, with as much detail as possible so that the developer can reproduce it, and fix it.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
govicinity
Forum Members
Forum Members
Posts: 125
Joined: Tue Nov 22, 2011 2:22 pm

Re: CGBlog Category Numbers Instead Of Names In FEU Form Are

Post by govicinity »

@Jo, thanks for looking and registering the bug, I'll see if I can roll it back this end from an old backup of the site for now and await an update. Cheers again.
Going up, woop, woop.
stetman
Forum Members
Forum Members
Posts: 20
Joined: Fri Feb 12, 2010 9:39 am

Re: CGBlog Category Numbers Instead Of Names In FEU Form Are

Post by stetman »

@govicinity, correct me if I'm wrong, but I don't think Jo registered the bug. So I did, because I'm having the same problem.
Any luck with previous version ?
stetman
Forum Members
Forum Members
Posts: 20
Joined: Fri Feb 12, 2010 9:39 am

Re: CGBlog Category Numbers Instead Of Names In FEU Form Are

Post by stetman »

Ok, time for an update. Calguy responded to my bug report that he tested the module and it worked. So I did a clean install and it did work with me too. I couldn't reproduce the problem.
I then did a sql export of all the cgblog tables and uninstalled the cgblog module. Then installed it again and imported the exported data and tadaaa....problem solved.

Don't forget to save your templates (as I did).
Hope this information is of any help.
govicinity
Forum Members
Forum Members
Posts: 125
Joined: Tue Nov 22, 2011 2:22 pm

Re: CGBlog Category Numbers Instead Of Names In FEU Form Are

Post by govicinity »

OK, I have uninstalled CGBlog on the website in question, and then re-installed it - categories work well with the new Sample template, but please note I have noticed that the most up-to-date Sample template is quite different from the previous one, so if you have saved your own altered templates, DO NOT paste them in as is, you may need to set up a new version of your own template by stripping in code from your own template to a new Sample template... I hope this makes sense!

When I just took my old template and pasted it in (which was a barely altered version of the old Sample template) I reproduced the error with the categories being numbered. I did also see a literal tag in one of the old Sample templates within the <__script__> tags themselves rather than outside them, although this had no bearing on the error itself.

I have also noticed a rogue <em> at the end of the li items just before the rec_count in the browse category templates, may be an idea to remove this or close the tag.

Oddly I now have another issue whereas the actual blog articles are not showing! Although the categories list states that there are articles within the categories!
Going up, woop, woop.
govicinity
Forum Members
Forum Members
Posts: 125
Joined: Tue Nov 22, 2011 2:22 pm

[SOLVED] CGBlog Category Numbers Instead Of Names In FEU For

Post by govicinity »

OK, despite clearing cache, updating page hierarchy, updating routes, optimising tables and repairing tables nothing seemed to work... thankfully now it seems to have corrected itself and is working, so looks like this thread is a solved issue. Thanks to everyone who had input.
Going up, woop, woop.
Post Reply

Return to “Modules/Add-Ons”