- Posts: 4
- Thank you received: 0
[SOLVED] error in K2 Categories after installing MEFG modul
- macdaddy311
- Topic Author
- Offline
- New Member
-
Less
More
12 years 7 months ago - 12 years 7 months ago #1100
by macdaddy311
error in K2 Categories after installing MEFG modul was created by macdaddy311
This error appears 3 times in a row at the top of the category NEW and EDIT. I can't get any further to try out the module
I am using Joomla 2.5.8 and K2 2.6.2
Warning: in_array() expects parameter 2 to be array, string given in /homepath/plugins/k2/mefgfork2/elements/extrafieldgroups.php on line 51
I am using Joomla 2.5.8 and K2 2.6.2
Warning: in_array() expects parameter 2 to be array, string given in /homepath/plugins/k2/mefgfork2/elements/extrafieldgroups.php on line 51
Last edit: 12 years 7 months ago by mmmaug1977. Reason: Removing absolute path for security issues
Please Log in or Create an account to join the conversation.
- mmmaug1977
-
- Offline
- Moderator
-
12 years 7 months ago #1103
by mmmaug1977
Replied by mmmaug1977 on topic error in K2 Categories after installing MEFG modul
Please update K2 to the latest version.
As for the warning, you can set error reproting level to System Default or None.
I will consider finding a solution to prevent these warnings, but don't worry they are not errors and will not stop the plugin from working.
As for the warning, you can set error reproting level to System Default or None.
I will consider finding a solution to prevent these warnings, but don't worry they are not errors and will not stop the plugin from working.
Please Log in or Create an account to join the conversation.
- macdaddy311
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
12 years 7 months ago #1104
by macdaddy311
Replied by macdaddy311 on topic error in K2 Categories after installing MEFG modul
Thank you for your reply. I get what you mean now that the errors don't mess up the ability of the plugin to work. I do have a question. I am trying to figure out the way the plugin display the information. In your example you have an address area then you have another area called additional information
I am trying to do something similar dev.iqcraft.com/glendale/index.php/2013-...26-19/autumn-terrace
I just can't figure out how to break apart the different fields into different categories, for example I want to split up two categories amenities and utilities.
dev.iqcraft.com/glendale/adminstrator
u:admin
p:admin
thanks much
I am trying to do something similar dev.iqcraft.com/glendale/index.php/2013-...26-19/autumn-terrace
I just can't figure out how to break apart the different fields into different categories, for example I want to split up two categories amenities and utilities.
dev.iqcraft.com/glendale/adminstrator
u:admin
p:admin
thanks much
Please Log in or Create an account to join the conversation.
- mmmaug1977
-
- Offline
- Moderator
-
12 years 7 months ago #1107
by mmmaug1977
Replied by mmmaug1977 on topic error in K2 Categories after installing MEFG modul
Breaking extra fields into groups is done in the template file, item.php
Here is the code I used to break fields:
My advice is to use template overrides as recommended by K2, to keep your layout customization through K2 updates
Have a look also at Categories Treeview for K2 and AutoMeta for K2 , you may need them in your site.
Here is the code I used to break fields:
Code:
<div class="itemExtraFields">
<h3>Basic Information</h3>
<ul>
<?php foreach ($this->item->extra_fields as $key=>$extraField): ?>
<?php if($extraField->value != '' && $extraField->group == 1): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">
<?php if($extraField->type == 'header'): ?>
<h4 class="itemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
<?php else: ?>
<span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span>
<span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>
<?php endif; ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<div class="itemExtraFields">
<h3><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h3>
<ul>
<?php foreach ($this->item->extra_fields as $key=>$extraField): ?>
<?php if($extraField->value != '' && $extraField->group == 2): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">
<?php if($extraField->type == 'header'): ?>
<h4 class="itemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
<?php else: ?>
<span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span>
<span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>
<?php endif; ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
My advice is to use template overrides as recommended by K2, to keep your layout customization through K2 updates
Have a look also at Categories Treeview for K2 and AutoMeta for K2 , you may need them in your site.
Please Log in or Create an account to join the conversation.
- macdaddy311
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
12 years 7 months ago - 12 years 7 months ago #1111
by macdaddy311
Replied by macdaddy311 on topic error in K2 Categories after installing MEFG modul
Thanks for your reply.
Please verify the item.php file you're referring to.
Before spending time on the sub-templating as you suggested, I want to make sure your fix at least works.
I'm editing /components/com_k2/templates/default/item.php and it is having no affect.
In fact, I could actually delete that file completely and K2 still works.
Please advise as to which item.php file I should be making changes to.
Please verify the item.php file you're referring to.
Before spending time on the sub-templating as you suggested, I want to make sure your fix at least works.
I'm editing /components/com_k2/templates/default/item.php and it is having no affect.
In fact, I could actually delete that file completely and K2 still works.
Please advise as to which item.php file I should be making changes to.
Last edit: 12 years 7 months ago by macdaddy311.
Please Log in or Create an account to join the conversation.
- mmmaug1977
-
- Offline
- Moderator
-
12 years 7 months ago #1112
by mmmaug1977
Replied by mmmaug1977 on topic error in K2 Categories after installing MEFG modul
Yes this is the correct file, I don't know how K2 works after deleting it!
Make sure you don't have template overrides under the your templates directory.
Also, make sure you have setup 2 or more extra field groups, and the are assigned to the proper categories, and those categories use the default template.
please note that the number in this statement:
this number is the group id, this can be found in the Extra field group in the backend.
BTW, I couldn't access the backend, I received 404 error page.
Please read this manual, MEFG User Manual , for more information.
Make sure you don't have template overrides under the your templates directory.
Also, make sure you have setup 2 or more extra field groups, and the are assigned to the proper categories, and those categories use the default template.
please note that the number in this statement:
Code:
$extraField->group == 1
BTW, I couldn't access the backend, I received 404 error page.
Please read this manual, MEFG User Manual , for more information.
Please Log in or Create an account to join the conversation.
- macdaddy311
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
12 years 7 months ago #1113
by macdaddy311
Replied by macdaddy311 on topic error in K2 Categories after installing MEFG modul
Thanks again for your quick replies.
The code example you provided for grouping is in place, yet we still can't get it to display properly.
We've implemented the template overrides - the code is in place here:
/www/dev.iqcraft.com/glendale/templates/gk_black_and_white/html/com_k2/templates/default/item.php
Can you please take another look and let us know why the plugin is not working?
We appreciate it, thanks again.
The code example you provided for grouping is in place, yet we still can't get it to display properly.
We've implemented the template overrides - the code is in place here:
/www/dev.iqcraft.com/glendale/templates/gk_black_and_white/html/com_k2/templates/default/item.php
Can you please take another look and let us know why the plugin is not working?
We appreciate it, thanks again.
Please Log in or Create an account to join the conversation.
- mmmaug1977
-
- Offline
- Moderator
-
12 years 7 months ago #1114
by mmmaug1977
Replied by mmmaug1977 on topic error in K2 Categories after installing MEFG modul
First of all, you have not updated K2, please update K2 to the latest version.
Then, if you copied the code and pasted it as it is, this will not work, because you should modify the group ids according to your configuration, you should use ids 2 and 3 in the Properties category, not 1 and 2 as in my code.
The plugin works in the backend perfectly, just use the correct ids, most propably it will work.
Then, if you copied the code and pasted it as it is, this will not work, because you should modify the group ids according to your configuration, you should use ids 2 and 3 in the Properties category, not 1 and 2 as in my code.
The plugin works in the backend perfectly, just use the correct ids, most propably it will work.
Please Log in or Create an account to join the conversation.