Debugging 3.2.2.1

3.2 Forum ONLY: If you've run into a problem, such as an error message, blank page, or similar problem, this is where to look. Post any installation or other problems or questions here, and I and other users will try to help.
  
8 Jan '10 Fri Jan 08, 2010 17:49    
layingback
Site Admin  
  •  

Post Re: Debugging 3.2.2.1

- rosbif

3) If I set the main Config to order by article then in a section I set order by article by category the normal view is ok however, with hdln view (Pro_News/mode=hdln/sid=8.html) I only get one category displayed - the other one is not displayed at all. The SQL seems to be bringing up the c.id=11 but not the c.id=12 articles. If I set the section to display as default but the main config to articles by category by section and then look at the same page (Pro_News/mode=hdln/sid=8.html) it seems to generate two sql statements from line 1664 so it gets all categories.


I've looked at this, and at the code, and thought long and hard, and I do have a few small changes to make, but essentially, it's only going to report 1 results block.

Let me explain: (For the benefit of others reading this, the set up in question is Config is set to Display By: Articles Only, and the Sections are set as Display By: Articles within Catgeory.) The top level (Config) setting of 'Articles Only' could also be described as "Without regard for Sections (and thus Categories)", ie. the first 'n' articles which match the specified sort order are to be displayed irrespective of which Section/Category they are elements of. So there can only be 1 result block (because there are no Sections involved).

So another way of saying this is that if you set Config as 'Articles Only' the display will be the same in mode=hdln regardless of any per-Section setting, because it is displayed without regard to Sections. Note however that the per-Section settings are still valid, because they are used when displaying just that Section, eg. mode=hdln/sid=3.

The changes I do need to do to the code though (for this case and the one above) is to the template: if the results are based entirely from the Config settings, then it should always use the template specified in Config I think. Currently it'll use the template of the Section applicable to the first article returned. Ditto sort order.

Thanks for reporting this - you found problems all right, just not the ones you thought Smile

Will let you know when the new version is ready. I have a number of small unrelated - but tested - changes as well, which I've worked on in the interim - plus Social Networking links have jumped to 60 sites!!!



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
8 Jan '10 Fri Jan 08, 2010 19:12    
rosbif
BetaTester  BetaTester
  •  

Post Re: Debugging 3.2.2.1

Thanks for all this.. I've not had a chance this week as I have a week at home and have been househunting! Will try and spend some time early next week... Hectic doesn't begin to describe this week!



rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Linux/2.2.11/4.1.22/5.2.17/9.3.4.1

 
 
 
 
  
16 Jan '10 Sat Jan 16, 2010 18:27    
rosbif
BetaTester  BetaTester
  •  

Post Re: Debugging 3.2.2.1

- layingback

Here's a not very elegant solution, but it keeps the db activity low. In functions.php look for:

PHP:
				if (($rowc['view'] == '0') || ($rowc['view'] == '3' && !is_user()) || (can_admin('Pro_News')) || (is_user() && (($rowc['view'] == '1') || (($rowc['view'] > 3) && (isset($userinfo['_mem_of_groups'][$rowc['view'] - 3])))))) {
$sec_arts_per_hdline = ($rowc['secheadlines']) ? $rowc['secheadlines'] : $arts_per_hdline;
$sql = 'SELECT a.id aid, a.*';


and replace with:

PHP:
				if (($rowc['view'] == '0') || ($rowc['view'] == '3' && !is_user()) || (can_admin('Pro_News')) || (is_user() && (($rowc['view'] == '1') || (($rowc['view'] > 3) && (isset($userinfo['_mem_of_groups'][$rowc['view'] - 3])))))) {
$sec_arts_per_hdline = ($rowc['secheadlines']) ? $rowc['secheadlines'] : $arts_per_hdline;
$sql = 'SELECT a.id aid, a.*';
if (($pnsettings['display_by'] == '0' && $rowc['secdsplyby'] == '0') || $rowc['secdsplyby'] == '0') {
$sql .= ',s.title stitle';
}


and for:

PHP:
					if (isset($list) && $list != '' && count($list) > '0') {

$z = 0;

foreach ($list as $row) {


And replace by:

PHP:
					if (isset($list) && $list != '' && count($list) > '0') {

$z = 0;

foreach ($list as $row) {
if (($pnsettings['display_by'] == '0' && $rowc['secdsplyby'] == '0') || $rowc['secdsplyby'] == '0') {
$rowc['stitle'] = $row['stitle'];
}



Give me an error

On /Pro_News/mode=hdln.html
While executing query "SELECT a.id aid, a.*,s.title stitle FROM chantill_pronews_articles as a WHERE a.catid=9 AND a.approved="1" AND a.active="1" AND display<>"2" AND (alanguage='english' OR alanguage='') ORDER BY display_order DESC, posttime DESC LIMIT 7"

the following error occured: Unknown column 's.title' in 'field list'

In: /home/chantill/public_html/modules/Pro_News/functions.php on line: 1665



rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Linux/2.2.11/4.1.22/5.2.17/9.3.4.1

 
 
 
 
  
9 Mar '10 Tue Mar 09, 2010 12:46    
rosbif
BetaTester  BetaTester
  •  

Post Re: Debugging 3.2.2.1

Have you had a chance to look at this again? Anything I can do? Would really love to get this cracked and running as my 'home' module...



rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Linux/2.2.11/4.1.22/5.2.17/9.3.4.1

 
 
 
 
  
9 Mar '10 Tue Mar 09, 2010 13:02    
layingback
Site Admin  
  •  

Post Re: Debugging 3.2.2.1

I have the code done I believe. But I'm also revamping the whole Featured Content Slider stuff (have better slider working, and at Section/Category level too - see post from fishingfan).

I'm trying to get FCS at Section level working in Center Block too - although close to giving up. When that is done - or aborted - I'll be ready to make release.

So I now have 3 people waiting - you for this, fishingfan for Section level FCS, and new user for Blog! Cool or Rolling Eyes ? Smile

BTW, now is probably as good a time as any to state that I'm dropping existing fcs out of the release. It's got too many issues to move forward with. Additionally I'm going to change Pro_News license slightly to permit for-fee templates. And you guessed it, make some of the templates cost a nominal amount. Like FCS, Blog, etc.

The original concept of a free template exchange never took off, plus there was no motive for me or anyone else to build templates that others would want. So now there will be, and I can cover more of my costs. Templating really is the strength of Pro_News, but only I was using it (for my commercial clients). So I think this will be a plus overall, if a bit of a shock initially. Note Pro_News the module is and will remain GPL2 for the foreseeable future ( at least until DF moves to GPL3 so that I can Wink )

Re your issue, I redefined and fixed according to my earlier post, plus found and fixed 2 old and very old SQL bugs which probably resulted in the unpredictable results. So I think it's right...



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
9 Mar '10 Tue Mar 09, 2010 13:09    
rosbif
BetaTester  BetaTester
  •  

Post Re: Debugging 3.2.2.1

Great news - looking forward to it. I think it's fair enough to have a free module and then to pay for the templates that you use - built like a free CMS and then paying for the really professional themes. So, having just moved all my articles to fcs, will the new FCS template involve me making any changes?



rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Linux/2.2.11/4.1.22/5.2.17/9.3.4.1

 
 
 
 
  
9 Mar '10 Tue Mar 09, 2010 13:36    
layingback
Site Admin  
  •  

Post Re: Debugging 3.2.2.1

- rosbif

So, having just moved all my articles to fcs, will the new FCS template involve me making any changes?


No I don't believe so. Just use new template in place of old one. It has much more to it. The current highlighted slider icon stays in view unless or until user moves it out, the whole slider of icons works much more smoothly and less hyper than before. Oh, and yes your request to swap buttons is honoured.

Plus there is a 800px version now as well as the 400px one. Just a different template.

It was the smoothing out of the icon behaviour and the large image version which broke the earlier release. I guess I rushed that one out a bit too soon.

Looks as if the Block variant of the Section fcs is about to bite the dust - I don't seem to be able to run javascript calls in both the template and the block as I need to. Plus it is really hard to ensure that the .js file is always present if Pro_News isn't current module. (So if block can only work when Pro_News is active, what's the point?)

But the Section level one is pretty cool, uses FCS the way it was originally intended. Have 3 or more articles in a Section, and assign that Section the new template, and the Intro's for each will revolve, with a Prev/1/2/3/.../next button in lower right corner. Only restriction is that all the article intro's really need to be about same size, same a all images in album fcs really need to be the same. (In both cases an out-of-size one will still display, but may be truncated.)

So you could for example have 3+ ads as Articles is a special section and have them rotate. Or in your case perhaps special articles about each of your 3 domains, which will "highlight" them in the main page.

Oh, and you can have different CSS for each of the different fcs types, and it's not much work to have different CSS styles for the same fcs if you need it.

So I have just 1 feature to add before release (plus backing out Block FCS) which is a trick learnt from madis so that you can modify Pro_News CSS in a non-destructive way. Then when new release comes out with better Pro_News CSS you may well be able to use it without reworking all your CSS changes back in.

EDIT: And I forgot, fcs handles Titles now, as well as photo album Captions. Up to 2 lines worth, overlaying the image, more if you want to change the CSS style, as well as a tooltip with same content.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
Link  QR 
Share this Printer Friendly Page  facebook   google+   linkedin   twitthis  
Show more ...


Forum Permissions - You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum