[Solved] Couple of issues

Post

Posted
Rating:
Item has a rating of 5 (Liked by Joey)
#5346 (In Topic #1223)
Avatar
Standard member
SoccerDad is in the usergroup ‘Community saint’
Hey All!

Just going to plop these here for the time being in case I've missed a resolution to same somewhere. If they are indeed issues, I'll post them in the bug tracker and delete this post.

1) Side news archive shows the different years/months in which items have been posted, but clicking on any of the months returns all the posts in the database.

2) Side news category list

Code

{$STRIP_TAGS,{!CATEGORY_SUBORDINATE_2,{COUNT*}}}
shows '1 entry' for every category regardless of actual amount.

Thanx!
SD

Last edit: by SoccerDad


"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Joey)
#5347
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5348
Avatar
Standard member
SoccerDad is in the usergroup ‘Community saint’
Hey Chris!

Thanx for the welcome, appreciated, I've missed being able to hang out here! I apologize for disappearing on and off, however, I've now hung up my chef knives for good and it's back to geeking full time, yay! :D I'm looking forward to getting back into Composr and hopefully being able to give back to Composr after all the years of fun it's given me!

Thanx also for the fixes and the fast turnaround, *grin*, another reason why I love it here!

One further unrelated question if I may: I'm looking to refine my CSS and layout skills (OK, looking to develop them might be a better phrase ;) ). I'm not much of a creative type, however, I'm pretty good at the proverbial 'embrace and extend' so I'm going to work away at adapting some good looking open source themes for Composr and posting them here for the community. My question surrounds v11: are there going to be significant changes to the underlying themeing structure and should I wait until some betas are released or is it OK to go ahead and start now on v10.0.21 and just apply any tweaks that may be necessary to adapt to the new version?

TIA!
SD/TR

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved
Online now: No Back to the top

Post

Posted
Rating:
#5350
Avatar
Standard member
SoccerDad is in the usergroup ‘Community saint’
Changed the topic title just a wee bit too soon:

1) The archive block now grabs the correct year and month to start with, but after all posts are shown meeting the selected criteria, all previous posts prior to the selected criteria are also shown.

2) Adding the side categories block after making the changes (I made the changes by hand twice just to make sure it wasn't the very possible operator error ;) ) produces a stack trace. PHP notice:

Code

PHP NOTICE [8] Undefined index: _nc_title in sources/global3.php on line 1481 (version: 10.0.21, PHP version: 7.2.10-0ubuntu0.18.04.1, URL: /cms/index.php?page=cms-comcode-pages&type=__edit&keep_no_xhtml=1)
and the culprit line appears to be:

Code

File    '/var/www/shatter/sources/blocks/side_news_categories.php'
Line    97
Function    'sort_maps_by'
Args    

array

'_nc_title'
which on my end is:

Code

sort_maps_by($categories, '_nc_title');

The issue appears to be limited strictly to the sorting action as the counts are now correct but the categories are no longer sorted.

Troubleshooting steps:
  1. caches cleared each test run
  2. commenting out line 97 clears the error, counts are still correct, no sorting occuring
  3. comparing phpmyadmin cms_news_categories with output shows output in the same order as the database table when it is unsorted
Note: I have one category that has no articles in it and despite the routine from line 88 to 95, it is not shown in the output.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved
Online now: No Back to the top

Post

Posted
Rating:
#5351
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Re latest post (not read prior post yet)…

1- This is expected. It just jumps into the pagination at a certain point. I'll add a tracker issue to consider changing that.

2- Try this Speculative followup fix to side_news_categories block fix · ocproducts/composr@fccfe34 · GitHub
Oddly I couldn't reproduce an error, although I clearly see the bug. Seems to be a difference between PHP versions.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5353
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’

Chris Graham said

Oddly I couldn't reproduce an error, although I clearly see the bug. Seems to be a difference between PHP versions.

Ah, because I had only one category to show, no sort work needed doing.
Added a check on dev-mode to make it catch these errors (no need for these changes, just posting for reference/interest):
Added checks for sort function stability, so dev mode raises errors e… · ocproducts/composr@d4be28a · GitHub


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5354
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’

SoccerDad said

Hey Chris!

Thanx for the welcome, appreciated, I've missed being able to hang out here! I apologize for disappearing on and off, however, I've now hung up my chef knives for good and it's back to geeking full time, yay! :D I'm looking forward to getting back into Composr and hopefully being able to give back to Composr after all the years of fun it's given me!

Thanx also for the fixes and the fast turnaround, *grin*, another reason why I love it here!

One further unrelated question if I may: I'm looking to refine my CSS and layout skills (OK, looking to develop them might be a better phrase ;) ). I'm not much of a creative type, however, I'm pretty good at the proverbial 'embrace and extend' so I'm going to work away at adapting some good looking open source themes for Composr and posting them here for the community. My question surrounds v11: are there going to be significant changes to the underlying themeing structure and should I wait until some betas are released or is it OK to go ahead and start now on v10.0.21 and just apply any tweaks that may be necessary to adapt to the new version?

TIA!
SD/TR

Well, you're very welcome back - and no need to apologise, it's not a jail ;-).

v11 themeing will change a great deal, so themes will not be easy to adapt. Salman has been putting in a considerable amount of work modernising everything.
I can't say when a v11 beta will be out – it's in Salman's hands right now, and I'm still getting my life fully back in order after moving out here to the US (this week it's dental stuff eating up all my time). Things are a lot more settled for me than they were, but at the same time I have to get a good volume of billable hours out. I think in the new year I will have a big spike in free time to get things towards the finish line.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5355
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Oh btw, in the future please try to separate things out into more topics. Recently we had a guidelines change, and to keep things tidy, and less monolithic, I'd like topics to be more directed. Makes it easier to manage, follow, and easier for others to chime in. I didn't care in the past as frankly my thinking has changed on it.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5358
Avatar
Standard member
SoccerDad is in the usergroup ‘Community saint’

News archive block: gotcha on that. My $0.02 on any changes in that behaviour: the only navigability/usability concern I can think of would be the reader missing the change in date as the last criterion selected item rolls into the rest of the news archive. Perhaps adding an <h*> separator header, 'Older Articles' or something like that, after the selected criterion articles are finished.

News categories block: that second fix you posted has solved the issue, thanx!  :thumbs: I'm still not seeing the categories that have no entries (added a new empty category to double check), however, not sure that's a big deal IMHO. I wouldn't have noticed it had I not been reviewing the database for troubleshooting purposes and the empty categories are available for selection on the new news entry screen which is the important bit anyway.

v11 themeing: righto, I'll finish puttering away on the one I've been working on for the v10 structure and then hang tight.

Welcome to North America! :) Hopefully things settle quickly for you so you can begin enjoying this next chapter in your life.

Separating forum items: understood, makes perfect sense, will do!

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved
Online now: No Back to the top

Post

Posted
Rating:
#5360
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
I'm still not seeing the categories that have no entries (added a new empty category to double check)

Yes, that's intentional. You'll only see empty categories if all categories are empty.

Thanks :).


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5361
Avatar
Standard member
SoccerDad is in the usergroup ‘Community saint’
Lol, yeah, I'm gettin' old: totally misread the commented section to say if a category, not all categories had no entries show them anyway.

Interestingly, this comment only appears in v10.0.21 but only in my local installation and not the one I test with on my hosting account, however they have not been upgraded in tandem over time. Also explains why my line numbers were 2 out of sync with the changes you provided for this block. Oh well, not important and perhaps time for some new glasses for me ;)

Thanx again!

side_news_categories lines 87-97

Code


        // Oh, no categories with any entries - so show them regardless of entries
        if (count($categories) == 0) {
            foreach ($_categories as $category) {
                if (has_category_access(get_member(), 'news', strval($category['id']))) {
                    $category['_nc_title'] = get_translated_text($category['nc_title']);
                    //$categories[] = array($category, $count);
                    $categories[] = array($category, $count, $category['_nc_title']);
                }
            }
        }

Edit: *chuckle*, I was beginning to question my sanity again so went back to GIT and here's where the comment came from as I just cut and pasted the entire section in. Mystery solved, some melon marbles still intact :)

22 views (29 KB)

Last edit: by SoccerDad


"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved
Online now: No Back to the top

Post

Posted
Rating:
#5362
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Right, I actually just added the comment when working on the code for this topic. Sometimes I'll do that, see old code that isn't entirely clear, and rework it a little.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5363
Avatar
Standard member
SoccerDad is in the usergroup ‘Community saint’
 :thumbs:  :)

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

Vaiva, gabriel58, MVLipwig, Paul D, mytracker, babu, deepu_ms

Forum statistics:
  • 1,174 topics, 5,550 posts, 6,746 members
  • Our newest member is waqasf160
Birthdays:
Back to Top