HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Fun with Catalogs

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#93132 (In Topic #18638)
Avatar

Honoured member

An after-upgrading and change of web host mess

Hi everyone! I've got a quandry to try to unravel. When I changed web hosts, I also upgraded to the latest site code. All is decently well now. However, I seem to have some issues with the Catalogs. I'm only using one, but it has a boat load of categories and entries. However, the main_cc_embed block that I am using on many many pages to display entries of publications on dressed up pages, is no longer giving me the ability to select a category...only the catalog itself. I see new advanced options to enter category IDs and even entry numbers to select individual entries...but no combination of trying to use that, will make say, 20 entries from the reviews category, appear on the page. 

For now I used the other recent catalog entries block, to sort of accomplish the result, but that shows entries from all categories...and won't be useful on the publisher pages themselves.

I found that existing old comcode page blocks on publisher pages I finished before all this, still work. So I compared the raw source code view of them, and they are basically the same, with the exception that the block param number is different...if you double click the comcode box to edit it that way, the number or category name is nowhere...something is not communicating there properly.

Now, I can use that to edit pages manually in source view, and look up category numbers as I go forward...but that certainly isn't the way it's supposed to be working, so I think something is corrupt or not looking at the database correctly after the upgrade. A file integrity check shows zero problems.

Now, the last piece of the puzzle...the category tree is changed from how it was...when you go in to edit categories, it is showing ALL categories are under the main archive category, where previously, there was a Comics, Zines, Music breakdown, and the rest of those categories were under THOSE categories. Rebuilding the correct structure won't be too big a deal...I've moved a few categories back and they are no worse for wear. But perhaps that is part of why I can't just choose a category in the catalog at all from the comcode interface.

Thoughts? Insight? Anything I can do? I appreciate anyone that's read this and taken the time to understand my problem.
Back to the top
 
Posted
Rating:
#93140
Avatar

Honoured member

BTW: this is on a MSN site, not sure if that's a factor. Also, URL if anyone wants to look over things: www.selfpubmag.com
Back to the top
 
Posted
Rating:
#93145
Avatar

I can see the problem. The block editor is putting in a blank "select" parameter to the block, and ocPortal is seeing that as a blank select rather than no select. If you wanted e.g. category #6, try putting select as "6*". That means everything under category 6 (without the '*' the 6 would refer to an entry ID).

We'll fix this, it should not respect blank select parameters that come out of the editor.

An alternative fix would be to manually edit the Comcode (with WYSIWYG off), to remove select="".

Now, the last piece of the puzzle…the category tree is changed from how it was…when you go in to edit categories, it is showing ALL categories are under the main archive category, where previously, there was a Comics, Zines, Music breakdown, and the rest of those categories were under THOSE categories. Rebuilding the correct structure won't be too big a deal…I've moved a few categories back and they are no worse for wear.

This would be if you had unchecked 'tree' from the catalogue options. It'd reorganise them as a flat list of categories. If you put tree back on, you can then structure them back into a tree.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
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 ocPortal whenever you see the opportunity.
  • 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 ocPortal 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.
Back to the top
 
Posted
Rating:
#93146
Avatar

Honoured member

OK! That does get the category to display without editing the param with WYSIWYG off. Not as nice as selecting the category from a tree list, but works. Will we be able to select categories from a catalog from the block editor in the future?

I did re-do the tree structure, thinking that would make it start to display categories…no biggie re-shuffling the categories back into the tree the way I had em.

I'm sure this will be changed up a bit when the multi-category stuff gets worked on. I'm working on gathering some funds to help fund that…it would really help with what I'm trying to accomplish.
Back to the top
 
Posted
Rating:
#93147
Avatar

Will we be able to select categories from a catalog from the block editor in the future?

Yes change will be…

sources/blocks/main_cc_embed.php:

Code

      if ((!is_null($map)) && (array_key_exists('select',$map)))
to:

Code

      if ((!is_null($map)) && (array_key_exists('select',$map)) && ($map['select']!=''))


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
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 ocPortal whenever you see the opportunity.
  • 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 ocPortal 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.
Back to the top
 
Posted
Rating:
#93167
Avatar

Honoured member

I tried changing that code. It did not change the behavior of the block, I can still only select the catalog…the categories in the catalog do not appear select-able anywhere. I did clear the caches to make sure it wasn't a cache thing too.
Back to the top
 
Posted
Rating:
#93174
Avatar

"param" is the categories. If the names seem the same as catalogue names, it is probably just showing a default or root category for that catalogue. Opening up the list you will see the catalogue names above the category names, and those are greyed out. I have just confirmed this -- I added a block, and it did indeed choose the numeric category ID when I selected the named category.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
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 ocPortal whenever you see the opportunity.
  • 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 ocPortal 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.
Back to the top
 
Posted
Rating:
#93175
Avatar

Honoured member

Ok, there is where things are wrong for me then. The param drop down offers me the following (I tried to screen capture but it wouldn't get it) in the drop down:

Archive
FAQs

     Archive
Products
     Frequently Asked Questions
products
     Products Home

The bold main things, can't be clicked on. The things under those, can...but they do not expand to show any sub categories...and obviously...2 of them aren't in the right place at all.

Is there anything I can do to fix this?
Back to the top
 
Posted
Rating:
#93178
Avatar

Oh, I can see that now. Does this fix it?

Attachment
sources/misc_scripts.php
» Download: misc_scripts.php (39 Kb, 119 downloads so far)



Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
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 ocPortal whenever you see the opportunity.
  • 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 ocPortal 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.
Back to the top
 
Posted
Rating:
#93183
Avatar

Honoured member

That…gives me this when the block is called up

Fatal error: Call to undefined method database_driver::query_select_value() in /home/content/92/10010992/html/magazine/sources/misc_scripts
.php on line 702
Critical error - bailing out

This is an error that has been elevated to critical error status because it occurred during the primary error mechanism reporting system itself (possibly due to it occuring within the standard output framework). It may be masking a secondary error that occurred before this, but was never output - if so, it is likely strongly related to this one, thus fixing this will fix the other.
PHP ERROR [1] Call to undefined method database_driver::query_select_value() in sources/misc_scripts.php on line 702 (version: 9.0.2, PHP version: 5.3.14, URL: /data/block_helper.php?type=step2&block=main_cc_embed&field_
name=post&utheme=default&block_type=main)
Stack trace…

File -> '/home/content/92/10010992/html/magazine/sources/failure.php
'
Line -> 693
Function -> 'die_html_trace'
Args -> array ( 0 => 'PHP ERROR [1] Call to undefined method database_driver::query_select_value() in sources/misc_scripts.php on line 702 (version: 9.0.2, PHP version: 5.3.14, URL: /data/block_helper.php?type=step2&block=main_cc_embed&field_
name=post&utheme=default&block_type=main)', )
File -> '/home/content/92/10010992/html/magazine/sources/global2.php
'
Line -> 1009
Function -> '_fatal_exit'
Args -> array ( 0 => 'PHP ERROR [1] Call to undefined method database_driver::query_select_value() in sources/misc_scripts.php on line 702', )
File -> '/home/content/92/10010992/html/magazine/sources/failure.php
'
Line -> 220
Function -> 'fatal_exit'
Args -> array ( 0 => 'PHP ERROR [1] Call to undefined method database_driver::query_select_value() in sources/misc_scripts.php on line 702', )
File -> '/home/content/92/10010992/html/magazine/sources/global2.php
'
Line -> 872
Function -> '_ocportal_error_handler'
Args -> array ( 0 => 'error', 1 => 1, 2 => 'Call to undefined method database_driver::query_select_value()', 3 => 'sources/misc_scripts.php', 4 => 702, )
File -> '/home/content/92/10010992/html/magazine/sources/global2.php
'
Line -> 808
Function -> 'ocportal_error_handler'
Args -> array ( 0 => 1, 1 => 'Call to undefined method database_driver::query_select_value()', 2 => '/home/content/92/10010992/html/magazine/sources/misc_script
s.php', 3 => 702, )
Function -> 'catch_fatal_errors'
Args -> array ( )
Details here are intended only for the website/system-administrator, not for regular website users.
If you are a regular website user, please let the website staff deal with this problem.

Depending on the error, and only if the website installation finished, you may need to edit the installation options (the info.php file).

ocProducts maintains full documentation for all procedures and tools. These may be found on the ocPortal website. If you are unable to easily solve this problem, we may be contacted from our website and can help resolve it for you.

ocPortal is a CMS for building websites, developed by ocProducts.
Back to the top
 
Posted
Rating:
#93184
Avatar

Attachment
» Download: misc_scripts.php (39 Kb, 124 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
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 ocPortal whenever you see the opportunity.
  • 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 ocPortal 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.
Back to the top
 
Posted
Rating:
#93185
Avatar

Honoured member

Ok, that gets the catalogs lined up properly...but as far as being able to choose a category under that catalog...nothing...just lets me choose the catalog.
Back to the top
 
Posted
Rating:
#93186
Avatar

But categories showed already, and were clickable, just in the wrong places and only the top level ones. The 'bold' things are the catalogues, the selectable ones are the categories.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
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 ocPortal whenever you see the opportunity.
  • 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 ocPortal 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.
Back to the top
 
Posted
Rating:
#93189
Avatar

Honoured member

so only the top level category is select-able? ever? If I want to select a sub-category, I then HAVE to edit it in the Source view, and change the param number manually? or use the advanced Select option and put in a 12* to show things from a sub-category?

didn't it used to give the full catalog tree so you could just select whatever category you clicked? That's how I remember setting up pages like:

Self Publisher Hall of Fame - Self Publisher! Magazine

which is showing every publication in the category of that publisher…meaning if the publisher sends a new listing, I add it to the catalog, and don't have to change anything on it's page for it to instantly appear there.

I've got 5 main sub-categories, music, comics, zines, etc…and then each of those has a category for the publisher's name….of which I have 100's. Most of their pages are not set up for the dynamic display of their publications yet…I'm just seeing if there is an easy way to select those 3rd level categories…otherwise I have to look up each one's number- and I don't think I had to do that before.
Back to the top
 
Posted
Rating:
#93195
Avatar

I can't remember the history of this but I guess it used to just allow manual typing in of the category IDs rather than a list. The list is limited in length, if there are too many categories.

To tell you the truth I'm pretty ill this week, plus my git repository is in a state of flux, that's why I'm being a bit patchy on this. I have tried to rework this some more…

Attachment
» Download: misc_scripts.php (39 Kb, 124 downloads so far)


Rules:
  • If there are less than 300 top level categories, and less than 300 categories in total, show a full category list
  • If there are less than 300 top level categories, and more than 300 categories in total, show a top level category list but ONLY if no category has been selected yet (in which case, show a text input)
  • If there are more than 300 top level categories, show a text input


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
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 ocPortal whenever you see the opportunity.
  • 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 ocPortal 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.
Back to the top
 
Posted
Rating:
#93197
Avatar

Honoured member

Well I certainly appreciate your attention on this in any sense, and hope you feel better soon!

I unfortunately have to report that that version of the file, gives me a blank box, gives a "loading" for a split second, then goes blank.

Don't stress too much - I mean, I'm not above editing the blocks manually for now…and that project of adding those blocks to pages in my site, is a long term project anyway…

I was just hoping for an easier way…y'know.
Back to the top
 
Posted
Rating:
#93209
Avatar

Thanks for your patience.

I fixed the parse error.

Attachment
» Download: misc_scripts.php (39 Kb, 148 downloads so far)



Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
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 ocPortal whenever you see the opportunity.
  • 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 ocPortal 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.
Back to the top
 
Posted
Rating:
#93213
Avatar

Honoured member

Hmm, the only change I notice in this version of the file is, the old blocks show a number instead of the name, and there is nothing else select-able in param. going to make a new block, I see the choice of top level categories of the active catalogs…and can choose a top level category.

No sub categories, but I can edit them now once the block is there by re-opening the box and changing the number that shows. I can just make a spreadsheet reference of all the category numbers so I can look and see what publisher is what number when I make boxes for their pages, so - that's better than nothing. I probably have too many categories to function like a normal person.

I'l be having even more fun when we are able to put entries into multiple categories, lol
Back to the top
 
Posted
Rating:
#93215
Avatar

Yes, this is by design. If you have no setting yet it tries to help a little with choices of top level items. If you have a setting it has to be more conservative and just gives an input box, so it knows the existing setting can be preserved.

If you want to you can look into the code and raise the 300 number in it. That is designed to stop performance becoming unreasonable, but performance vs convenience is always an individual tradeoff.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
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 ocPortal whenever you see the opportunity.
  • 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 ocPortal 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.
Back to the top
 
Posted
Rating:
#93269
Avatar

Honoured member

Chris,

Tried that. Raised the number to 10000 - just to see what performance is lost if I try to access all my categories. I didn't really notice any load-time difference in the box…however, the drop-down for param has the categories fairly wonky, not in order of what we see in the tree that is present when say, adding an entry, and you're choosing what category to put it in…that tree.

I keep wondering if the older version of the code, if the box used to create/edit the comcode for this, didn't use a tree menu…cause I remember it being much easier to choose a category (but I don't remember specifically how it was).

Anyway, here's hoping that info helps something, somewhere. With probably over 1000 categories total, I didn't see any slow-down loading the box, just the way it's listing them is wrong…
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Expand