Jump to content

What has changed in 4.1


Wayne B

Recommended Posts

Hi

In pages I had a plugin created which I used in the sidebar - code as follows

<style>
  .myButton {
	-moz-box-shadow: 0px 1px 0px 0px #f0f7fa;
	-webkit-box-shadow: 0px 1px 0px 0px #f0f7fa;
	box-shadow: 0px 1px 0px 0px #f0f7fa;
	background-color:#00376c;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:6px;
	border:1px solid #057fd0;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:10px;
	font-weight:bold;
	padding:3px 12px;
	text-decoration:none;
	text-shadow:0px -1px 0px #5b6178;
}
.myButton:hover {
	
}
.myButton:active {
	position:relative;
	top:1px;
}
</style>
{{if !empty( $records ) }}
	<h3 class='ipsWidget_title ipsType_reset'>{lang="Current Member of the Month" sprintf="$database->recordWord( 2, TRUE )"}</h3>
	{{if $orientation == 'vertical'}}
		<div class='ipsPad_half ipsWidget_inner'>
			<ul class='ipsDataList ipsDataList_reducedSpacing'>
				{{foreach $records as $record}}
              <li class='ipsDataItem'>
                <div class='ipsDataItem_main'>
							<div class="ipsCommentCount ipsPos_right {{if ( $record->record_comments ) === 0}}ipsFaded{{endif}}" data-ipsTooltip title='{lang="replies_number" pluralize="$record->record_comments"}'>{expression="$record->record_comments"}</div>
							<a href="{$record->url()->setQueryString( 'do', 'getLastComment' )}" title='{lang="view_this_topic" sprintf="$record->title"}' class='ipsDataItem_title ipsType_break'>{wordbreak="$record->_title"}</a>{$record->customFieldDisplayByKey('member', 'listing')|raw}<br>
							<span class='ipsType_light ipsType_small'>{$record->_content|raw}</span>
                  <div align="center"><a href="{$record->url()->setQueryString( 'do', 'getLastComment' )}" class="myButton">Leave A Comment</a></div>
						</div>
					</li>
				{{endforeach}}
			</ul>
		</div>
	{{else}}
		<div class='ipsWidget_inner'>
			<ul class='ipsDataList'>
				{template="recordRow" group="listing" location="database" app="cms" themeClass="IPS\cms\Theme" params="null, null, $records"}
			</ul>
		</div>
	{{endif}}
{{endif}}

Worked perfectly fine on 4.0.X

Upgraded to 4.1 and now 4.1.2 and if I try to use the plugin in the sidebar it delivers a fatal error to the page

Fatal error: Call to a member function recordWord() on a non-object in /home/xxx/xxx/xxx/system/Theme/Theme.php(3948) : eval()'d code on line 45

Anyone able to advise what has gone wrong please?

Link to comment
Share on other sites

2 minutes ago, Police Community said:

Is anyone able to advise how to correct it?

At first glance i dont notice anything out of the ordinary.

Im not sure how to correct it but i could advise you to save it how it is now, and start removing sections of the code until the error goes away, pinpoint the cause and then see if the problem area variables are the same in 4.1 as they had been in the original plugin.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...