Keyword

[SOLVED] Returning the Value of an Extra_Field In category_item View

More
9 years 3 months ago #136585 by pascal95223
OK i test it.
<?php if( isset($this->item->extraFields->test->value)): 
echo ok;
else: 
echo notok;
endif;
?>

I see notok on category_item.php and i see ok on item.php

And var_dump is different on item.php
	object(stdClass)#562 (8) { ["id"]=> string(2) "21" ["name"]=> string(4) "test" ["value"]=> string(14) "OK TEST OK" ["type"]=> string(9) "textfield" ["group"]=> string(1) "2" ["published"]=> string(1) "1" ["ordering"]=> string(2) "10" ["alias"]=> string(4) "test" }

It's very strange.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 months ago - 9 years 3 months ago #136588 by Krikor Boghossian
Replied by Krikor Boghossian on topic Returning the Value of an Extra_Field In category_item View
I see two different fields, check the id of each field (21 in the item and 10 in the category_item). Make sure that your fields have distinct aliases.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Last edit: 9 years 3 months ago by Krikor Boghossian.

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

More
9 years 3 months ago - 9 years 3 months ago #136589 by pascal95223
No no it's same, i just try to remove last extrafields and create a new one to test.

On category_item.php
object(stdClass)#466 (8) { ["id"]=> string(2) "21" ["name"]=> string(4) "test" ["value"]=> NULL ["type"]=> string(9) "textfield" ["group"]=> string(1) "2" ["published"]=> string(1) "1" ["ordering"]=> string(2) "10" ["alias"]=> string(4) "test" }

On item.php
object(stdClass)#562 (8) { ["id"]=> string(2) "21" ["name"]=> string(4) "test" ["value"]=> string(14) "CEST OK A MORT" ["type"]=> string(9) "textfield" ["group"]=> string(1) "2" ["published"]=> string(1) "1" ["ordering"]=> string(2) "10" ["alias"]=> string(4) "test" }
Last edit: 9 years 3 months ago by pascal95223.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 months ago #136596 by Krikor Boghossian
Replied by Krikor Boghossian on topic Returning the Value of an Extra_Field In category_item View
On your previous post you pasted
object(stdClass)#6909 (8) { ["id"]=> string(2) "10" ["name"]=> string(25) "test" ["value"]=> NULL ...

Which is a different field within the same group. Remove these fields and start over with a new distinct alias.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
9 years 3 months ago #136598 by pascal95223
Yes i create new one and test it:
On category_item.php
object(stdClass)#466 (8) { ["id"]=> string(2) "21" ["name"]=> string(4) "test" ["value"]=> NULL ["type"]=> string(9) "textfield" ["group"]=> string(1) "2" ["published"]=> string(1) "1" ["ordering"]=> string(2) "10" ["alias"]=> string(4) "test" }


On item.php
object(stdClass)#562 (8) { ["id"]=> string(2) "21" ["name"]=> string(4) "test" ["value"]=> string(14) "CEST OK A MORT" ["type"]=> string(9) "textfield" ["group"]=> string(1) "2" ["published"]=> string(1) "1" ["ordering"]=> string(2) "10" ["alias"]=> string(4) "test" }

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 months ago #136605 by Krikor Boghossian
Replied by Krikor Boghossian on topic Returning the Value of an Extra_Field In category_item View
Please read my last post. Remove these fields and start over with a new distinct alias. Do not use test again. If you keep getting the same issue let me know.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
9 years 3 months ago #136606 by pascal95223
Hi Krikor,

I try this and it's same.

Category_item.php
object(stdClass)#467 (8) { ["id"]=> string(2) "22" ["name"]=> string(6) "krikor" ["value"]=> NULL ["type"]=> string(9) "textfield" ["group"]=> string(1) "2" ["published"]=> string(1) "1" ["ordering"]=> string(2) "11" ["alias"]=> string(6) "krikor" } 

item.php
object(stdClass)#756 (8) { ["id"]=> string(2) "22" ["name"]=> string(6) "krikor" ["value"]=> string(3) "sdq" ["type"]=> string(9) "textfield" ["group"]=> string(1) "2" ["published"]=> string(1) "1" ["ordering"]=> string(2) "11" ["alias"]=> string(6) "krikor" }

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 months ago #136607 by Krikor Boghossian
Replied by Krikor Boghossian on topic Returning the Value of an Extra_Field In category_item View
Ok, can you send me admin access (Super User) via our contact form? www.joomlaworks.net/support/contact

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 2 months ago #140393 by Krikor Boghossian
Replied by Krikor Boghossian on topic Returning the Value of an Extra_Field In category_item View
This most likely related to a conflict with other K2 extensions which are used. Due to the face that this is a live site I would not like to change anything.

You should move this site to a dev enviroment, update K2 to 2.6.9 and update all your extensions.
If this does not work then try disabling these extensions one by one ( starting with K2 plugins ) until you find the culprit.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • quebecguitare
  • quebecguitare's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 11 months ago #144240 by quebecguitare
I finally found the faulty extension:


Content - Pagebreak - MyJspace
Site Plugin 2.4.2 26/08/2014 Bernard Saulme content 10127

Thank you Krikor, way to go!
Best Regards.

Thank you for your time!

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


Powered by Kunena Forum