Speedup code does not consider ForceFullBuild

All notes and input on 2.0 Development are herein. <ul><li>Feature requests</li>
<li>Bug Reports</li>
<li>Beta Testing Feedback</li>
<li>Open Dev Discussion</li></ul>

Moderator: Coranto Moderator Team

Speedup code does not consider ForceFullBuild

Postby Parahead » Sun Dec 19, 2004 9:08 am

I have just discovered a bug in the speedup code (that was added to the BuildNews sub in version 1.10) which prevents the use of the ForceFullBuild profile variable that are used to force profiles to be built when a change has been made to a style or profile settings. The bug is present in all versions of Coranto from 1.10 and above, up to the current 1.30.9 release. It only effects normal profiles, any other type of profile should be working as intended (example: Maginot, NewFilesAdvanced).

There is a hook 'BuildNews_Speedup_Code' and just above that there is the speedup code, looking like this in the 1.24 release (around line 911 in crcore.pl):
Code: Select all
if ($newsprofiles{$i}->{'type'} eq 'Standard' && $in{'action'} eq 'submitsave' && $EnableCategories && $ProfCats{$i} && $in{'Category'}){
  unless ($ProfCats{$i}->{$in{'Category'}} || $ProfCats{$i}->{'AllCategories'}){
    delete $ActiveProfiles{$i};
    next INITLOOP;
  }
}

It should look something like this:
Code: Select all
if ($newsprofiles{$i}->{'type'} eq 'Standard' && $in{'action'} eq 'submitsave' && $EnableCategories && $ProfCats{$i} && $in{'Category'} && !$newsprofiles{$i}->{'ForceFullBuild'} && !$CConfig{'ForceFullBuild'}){
  unless ($ProfCats{$i}->{$in{'Category'}} || $ProfCats{$i}->{'AllCategories'}){
    delete $ActiveProfiles{$i};
    next INITLOOP;
  }
}


NOTE (to ceberos76): The code looks a little bit different in 1.30.9 since there is a new hook in the speedup code (BuildNews_Speedup_Code_Delete) which should still be there! The only change is the first if-statement. Also note that I haven´t actually tested the code above, I am a bit occupied but wanted to inform you of my findings ASAP...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Re: Speedup code does not consider ForceFullBuild

Postby Parahead » Sun Dec 19, 2004 3:47 pm

Parahead wrote:I have just discovered a bug in the speedup code (that was added to the BuildNews sub in version 1.10) which prevents the use of the ForceFullBuild profile variable that are used to force profiles to be built when a change has been made to a style or profile settings. The bug is present in all versions of Coranto from 1.10 and above, up to the current 1.30.9 release. It only effects normal profiles, any other type of profile should be working as intended (example: Maginot, NewFilesAdvanced).
This bug isn´t so sevear as I first though, since the if-statement also includes a test for the action 'submitsave', which only makes the speedup code interesting when submitting newsitems. Still, the change as I described above should be made to take consideration to the 'ForceFullBuild' variables...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden


Return to Coranto 2.0 Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron