[SOLVED - kinda of...]Strange ListIt2 issue

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
jakovbak
Forum Members
Forum Members
Posts: 234
Joined: Thu Dec 13, 2012 2:54 pm

[SOLVED - kinda of...]Strange ListIt2 issue

Post by jakovbak »

Hello everyone!
On one of my websites I use ListIt2 to publish news and articles in several categories. For almost a year everything was working as it should. Recently, when any article is published - everything is working fine. But after awhile - a day, a week or 24 days sometimes (!) - something weird happens to SOME of the articles:

1) article category is changed to different category ONLY in front-end;
2) such article gets prefix saying "Loaded instance is not ListIt2 instance." before the name of the category.

I cannot find any obvious reason for this. There is no "pattern" on which articles are being changed. All of those articles are still listed and accessible within LI2 module.
Any ideas or similar experiences?

Thank you in advance and best regards!
Last edited by jakovbak on Mon Jul 14, 2014 1:43 pm, edited 1 time in total.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Strange ListIt2 issue

Post by velden »

Do you call other module(s) from within ListIt2 template/content?
jakovbak
Forum Members
Forum Members
Posts: 234
Joined: Thu Dec 13, 2012 2:54 pm

Re: Strange ListIt2 issue

Post by jakovbak »

Hello Velden!
No, there's nothing else but LI2 content in it's template!
Stikki

Re: Strange ListIt2 issue

Post by Stikki »

LI version number and example of summary template please.
jakovbak
Forum Members
Forum Members
Posts: 234
Joined: Thu Dec 13, 2012 2:54 pm

Re: Strange ListIt2 issue

Post by jakovbak »

ListIt2 v. 1.4

Summary tpl:

Code: Select all

{if $items|@count > 0}

	<div class="listitPagination">
		{if $pagecount > 1}
		<!-- pagination -->
			<p>
				{if $pagenumber > 1}
					{$firstpage}&nbsp;{$prevpage}&nbsp;
				{/if}

				{foreach from=$pagelinks item=page}
					&nbsp;{$page->link}&nbsp;&nbsp;
				{/foreach}

				{if $pagenumber < $pagecount}
					&nbsp;{$nextpage}&nbsp;{$lastpage}
				{/if}
			</p>
		<!-- pagination //-->
		{/if}
	</div>
   
	<!-- items -->
	{foreach from=$items item=item}
		<!-- item -->
		<div class="listititem">
   
			<h2 class="item-title">{$item->title}</h2>
   
			<!-- field definitions -->
			<div class="item-properties">
   
<!-- MY CUSTOM FIELDS START HERE -->   
				<!-- categories -->
				<div class="categories">
					{ListIt2Loader item='category' force_array=1 value=$item->fielddefs.categories.value assign='cats'}
						Kategorija: {$cats|implode:','}
				</div>
				<!-- categories //-->

				<div class="published">
					{$item->fielddefs.published->name}: {$item->fielddefs.published->value|cms_date_format}
				</div>

				{if $item->fielddefs.photo->value}
				<div class="photo">
					{CGSmartImage src="{uploads_url}/{$item->fielddefs.photo.value}" filter_resize='w,540' quality='100'}
				</div>
				{/if}

				{if $item->fielddefs.details->value}
				<div class="summary">
					{$item->fielddefs.summary->value}
				{if $item->fielddefs.details->value}
				<div class="itemMoreLink">
					<a href="{$item->url}">Detaljnije...</a>
				</div>
				{/if}
				</div>
				{elseif $item->fielddefs.summary->value}
					<div class="summary">
						{$item->fielddefs.summary->value}
					</div>
				{/if}

				{if $item->fielddefs.pdfdownload->value}
				<div class="pdfdownload">
					<a href="{uploads_url}/{$item->fielddefs.pdfdownload.value}" target="_blank"><img src="{uploads_url}/images/pdf.jpg" alt="pdf icon" onmouseover="this.src='http://www.opcina-kali.hr/uploads/images/pdfhover.jpg';" onmouseout="this.src='http://www.opcina-kali.hr/uploads/images/pdf.png';" src="uploads/images/pdf.jpg" alt="" width="50" height="50" /></a><p>(dokument možete pogledati u Vašem pregledniku ili ga preuzeti na računalo)</p>
				</div>
				{/if}

				{if $item->fielddefs.pdfdownload2->value}
				<div class="pdfdownload">
					<a href="{uploads_url}/{$item->fielddefs.pdfdownload2.value}" target="_blank"><img src="{uploads_url}/images/pdf.jpg" alt="pdf icon" onmouseover="this.src='http://www.opcina-kali.hr/uploads/images/pdfhover.jpg';" onmouseout="this.src='http://www.opcina-kali.hr/uploads/images/pdf.png';" src="uploads/images/pdf.jpg" alt="" width="50" height="50" /></a><p>(dokument možete pogledati u Vašem pregledniku ili ga preuzeti na računalo)</p>
				</div>
				{/if}

				{if $item->fielddefs.word->value}
				<div class="worddownload">
					<a href="{uploads_url}/{$item->fielddefs.word.value}" target="_blank"><img src="{uploads_url}/images/word.jpg" alt="pdf icon" onmouseover="this.src='http://www.opcina-kali.hr/uploads/images/wordhover.jpg';" onmouseout="this.src='http://www.opcina-kali.hr/uploads/images/word.jpg';" src="uploads/images/word.jpg" alt="" width="50" height="50" /></a><p>(dokument možete preuzeti na Vaše računalo)</p>
				</div>
				{/if}
		</div>
<!-- MY CUSTOM FIELDS END HERE //-->   

	</div>
	<!-- item //-->
	{/foreach}
	<!-- items //-->

	<div class="listitPagination">
		{if $pagecount > 1}
		<!-- pagination -->
			<p>
				{if $pagenumber > 1}
					{$firstpage}&nbsp;{$prevpage}&nbsp;
				{/if}

				{foreach from=$pagelinks item=page}
					&nbsp;{$page->link}&nbsp;&nbsp;
				{/foreach}

				{if $pagenumber < $pagecount}
					&nbsp;{$nextpage}&nbsp;{$lastpage}
				{/if}
			</p>
		<!-- pagination //-->
		{/if}
	</div>

{/if}
Tnx Stikki!
Stikki

Re: Strange ListIt2 issue

Post by Stikki »

Either use:

Code: Select all

{ListIt2Loader item='category' instance='MYINSTANCE' force_array=1 value=$item->fielddefs.categories.value assign='cats'}
Or upgrade to 1.4.1 which resolves other instance modules loaded inside LI templates. Problem is related to 1.4.1 changelog:
ListIt2Loader no longer attemts to grab default instance from template but handles it internally, so cases where CGSmartImage caused collapse aint possible anymore.
jakovbak
Forum Members
Forum Members
Posts: 234
Joined: Thu Dec 13, 2012 2:54 pm

Re: Strange ListIt2 issue

Post by jakovbak »

Just did upgrade ti 1.4.1 and now my site is blank! Not entirely, only where LI2 articles supposed to be... Damn!
Clearing back-end cache didn't help. Any ideas?
Tnx!
Stikki

Re: Strange ListIt2 issue

Post by Stikki »

1) Go to module instance folder under "modules" folder
2) Remove "templates" folder
3) Dance.
jakovbak
Forum Members
Forum Members
Posts: 234
Joined: Thu Dec 13, 2012 2:54 pm

Re: Strange ListIt2 issue

Post by jakovbak »

You mean via ftp?
...modules/ListIt2/templates
Stikki

Re: Strange ListIt2 issue

Post by Stikki »

Nooo nooo, don't touch anything under ACTUAL LI Core, but in ListIt2Instance folder.
jakovbak
Forum Members
Forum Members
Posts: 234
Joined: Thu Dec 13, 2012 2:54 pm

Re: Strange ListIt2 issue

Post by jakovbak »

Wait!
I did not delete "templates" folder because I have noticed there's no green checkmark next to my LI2 instance in back-end. I forgot it must be manually checked after an upgrade. So, I have clicked on it and now everything is working perfectly!
All of the articles have proper category and no more prefix "Loaded instance is not ListIt2 instance."...
I believe we can close this case without need to delete any folders!
Thank you all and best regards from rainy Croatian coast!
Have a nice week...
Stikki

Re: Strange ListIt2 issue

Post by Stikki »

Your welcome, but keep this in mind that previously instances contained "templates" folder and stuff was read from there, if your module instance folder contains that folder it reads from there again after 1.4.1 upgrade, means when you upgrade in future, it still keeps reading from there instead of framework folder.

This may cause unwanted behavior in backend. This is build in feature and not bug.

Kind regards from "sunny" Finland.

Yes issue can be closed.
jakovbak
Forum Members
Forum Members
Posts: 234
Joined: Thu Dec 13, 2012 2:54 pm

Re: Strange ListIt2 issue

Post by jakovbak »

To be honest, I'm still trying to locate that "templates" folder... ??? ;D

Really, there's nothing like "module instance folder under "modules" folder" in my installation of CMSMS on the server... Or maybe I got you all wrong?
Stikki

Re: [SOLVED - kinda of...]Strange ListIt2 issue

Post by Stikki »

If it's virgin 1.4 installation, there is no template folder. it was there pre 1.4 and wont get removed during upgrades, if it's not there, all good!

With module instance folder i mean:

ListIt2MyInstance, not ListIt2 folder
jakovbak
Forum Members
Forum Members
Posts: 234
Joined: Thu Dec 13, 2012 2:54 pm

Re: [SOLVED - kinda of...]Strange ListIt2 issue

Post by jakovbak »

Yeah, I tought so... About the name of the folder, I mean. But it never crossed my mind the "template" folder is version related!
Anyway, this topic is now officially closed!
Tnx again to all of you and have a nice day!
Post Reply

Return to “Modules/Add-Ons”