500 - Can not edit item, because item id is not set

More
11 years 6 months ago #29097 by yaK2manD
I have tested with r1498 and the error still happen

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

More
11 years 6 months ago #29101 by ggppdk
What are you returning with onBeforeSaveField, you are returning boolean false?


-- 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
11 years 6 months ago #29115 by yaK2manD
yes. I process a test :
Code:
$db2 = JFactory::getDBO(); $query = " SELECT COUNT(*) FROM ".$db2->nameQuote('#__mydb')." WHERE ".$db2->nameQuote('field1')." = ".$db2->quote($field1)." AND ".$db2->nameQuote('field2')." = ".$db2->quote($field2)."; "; $db2->setQuery($query); $count = $db2->loadResult(); if ($count >= 1 && $item->version < 1) { $jAp=& JFactory::getApplication(); $jAp->enqueueMessage("Notice12", 'notice'); return false; }

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

More
11 years 6 months ago #29116 by ggppdk
a yes for new items we should redirect to add item and not to edit item, but i think i have implemented this when canceling item saved was implemented i ll check it now, to verify


-- 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
11 years 6 months ago #29117 by ggppdk
This is rather easy to find and fix, i just checked it in backend, i see that problem is in frontend:

to get fix now and verify it ...

in components/com_flexicontent/controller.php about line 211 (it inside the if that checks if item was not created)

replace:
Code:
$link = 'index.php?option=com_flexicontent&'.$ctrl_task.'&id=0&typeid='.$post['type_id'].'&'. JUtility::getToken() .'=1';
with
Code:
$link = 'index.php?option=com_flexicontent&task=items.add&id=0&typeid='.$post['type_id'].'&'. JUtility::getToken() .'=1';


-- 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.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.284 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