Keyword

Big problem in category view

  • yannick berges
  • yannick berges's Avatar Topic Author
  • Offline
  • Senior Member
More
7 years 6 months ago #160902 by yannick berges
Big problem in category view was created by yannick berges
hello
i search a solution about this
if i do echo '<pre>' . print_r($this->item->extraFields , true) . '</pre>';
its display all values in categorie view but nothing for my new content only title..... in item view all values are good
i don't understand why... some idea ?
in this screen you can see 3 items in cat view
imgur.com/a/5zEyz

Please Log in or Create an account to join the conversation.

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
7 years 6 months ago #160903 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Big problem in category view
Hello

Make sure that the category/menu item is configured to allow displaying extra fields.

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

Please Log in or Create an account to join the conversation.

  • yannick berges
  • yannick berges's Avatar Topic Author
  • Offline
  • Senior Member
More
7 years 6 months ago #160907 by yannick berges
Replied by yannick berges on topic Big problem in category view
hello maybe the problem is the update to 2.7.1
after update i many error like this
Notice: Undefined property: stdClass::$extraFields in /home/c6bo/www/dev/templates/c6bo/html/com_k2/templates/Produit/item.php on line 55
in my line i have this
<?php echo $this->item->extraFields->Secondlibelle->value; ?></span>
on 2.7.0 this code work (Secondlibelle is an alias field)
thats wrong !!!

Please Log in or Create an account to join the conversation.

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
7 years 6 months ago #160908 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Big problem in category view
This ensures that extra fields are not set to show in the category, please look at the configuration.

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

Please Log in or Create an account to join the conversation.

  • yannick berges
  • yannick berges's Avatar Topic Author
  • Offline
  • Senior Member
More
7 years 6 months ago #160909 by yannick berges
Replied by yannick berges on topic Big problem in category view
yes ... i think i am agree ... it seems that 2.7.1 corrected this option ...
did you know to upgrade all categorie at same time §? i have 250 catégories ..

Please Log in or Create an account to join the conversation.

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
7 years 6 months ago #160912 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Big problem in category view
I think you can use the replace function of mysql on the k2 categories table, as the parameters are save as json string, you can't update a specific parameter using update statement.

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

Please Log in or Create an account to join the conversation.

  • yannick berges
  • yannick berges's Avatar Topic Author
  • Offline
  • Senior Member
More
7 years 6 months ago #160913 by yannick berges
Replied by yannick berges on topic Big problem in category view
ok i will test it maybe with regular component ..
thanks

Please Log in or Create an account to join the conversation.

  • yannick berges
  • yannick berges's Avatar Topic Author
  • Offline
  • Senior Member
More
7 years 6 months ago #160923 by yannick berges
Replied by yannick berges on topic Big problem in category view
hello i didn't find a good way to achieve this ....
i have some item with field and some other without in same category view ....
can you explain more ?

Please Log in or Create an account to join the conversation.

  • yannick berges
  • yannick berges's Avatar Topic Author
  • Offline
  • Senior Member
More
7 years 6 months ago #160930 by yannick berges
Replied by yannick berges on topic Big problem in category view
no way to force rendering by php in subtemplate ?

Please Log in or Create an account to join the conversation.

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
7 years 6 months ago #160933 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Big problem in category view
Hello,

Try this SQL statement, run it using phpmyadmin:
update #__k2_categories set params = replace(params, '"catItemExtraFields":"0"', '"catItemExtraFields":"1"')

WARNING:
Backup the database before running the above statement.
This will update all k2 categories.
Replace '#_' with your database prefix

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum