When no items are find, JS error occurs in the column togger code (default template)

More
9 years 1 month ago - 9 years 1 month ago #57799 by JeBy
Hi there,

Thanks again for the amazing work you put into Flexicontent! I have downloaded the new dev version and I have some errors to report:

In category view, when there are no items I get this error:

Uncaught TypeError: Cannot set property 'innerHTML' of null


It's in flexi-lib.js on line 721:
Code:
document.getElementById(container_div_id).innerHTML=str;

I guess it's because it's firing the toggleable columns even though I have none set up and I have no items anyway?

Also, using the Flexicontent Item Model I got this error (this is using the script you provided in your FAQ):
Code:
Fatal error: Call to a member function load() on boolean in ***/administrator/components/com_flexicontent/models/parentclassitem.php on line 3257

It's this code in the function "getVotingResolution" but I'm not even trying to get the voting details:
Code:
$item->load( $id );

Hope you can help! Thanks a lot in advance :)

Jeby
Last edit: 9 years 1 month ago by ggppdk.

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

More
9 years 1 month ago #57805 by ggppdk
Hello

about JS error i l fix if not already fixed

about code from FAQ article
please copy past the link of the FAQ article here,

maybe the sample code needs updating


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
More
9 years 3 weeks ago - 9 years 3 weeks ago #58085 by JeBy
Any updates on checking that code in the FAQ?

Thanks ahead!
Last edit: 9 years 3 weeks ago by JeBy.

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

More
9 years 3 weeks ago #58086 by ggppdk
Hello

added a fix in v3.0.9, and made some minor changes to the FAQ article

it will work in v3.0.9
github.com/FLEXIcontent/flexicontent-cck/releases


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
9 years 3 weeks ago - 9 years 3 weeks ago #58106 by JeBy
I'm on 3.0.9-dev3 and I still have the error. I gave you the wrong FAQ link though. It's actually the article where the Flexicontent Item Model is explained ( www.flexicontent.org/documentation/faq/7...-3rd-party-code.html ):

I'm using this code:
Code:
$itemmodel_name = FLEXI_J16GE ? 'FlexicontentModelItem' : 'FlexicontentModelItems'; $itemmodel = new $itemmodel_name(); $item = $itemmodel->getItem($json_result["id"], $check_view_access=false);

And the error is still:

Fatal error: Call to a member function load() on boolean in .../administrator/components/com_flexicontent/models/parentclassitem.php on line 3257

Last edit: 9 years 3 weeks ago by JeBy.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 1.612 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline