Forum Activity for @ultrajam

SteveX
@ultrajam
06/14/20 04:35:53AM
2,587 posts

livesearch field id has changed


Jamroom Developers

Hi Jamroom Team! I hope you are all safe and well.

I am looking at some custom modules which use live search fields, they are no longer working properly.

A live_search field no longer uses the field name in the id, it's an md5 hash of the form token instead.

I have javascript listeners which use that id to listen for changes to the livesearch_value hidden field. The js is added to the form page javascript_ready_function.

In the form view function, how do I get the field's id or the form token to use in the js?

Thanks
updated by @ultrajam: 09/15/20 12:48:35AM
SteveX
@ultrajam
03/13/19 02:42:41PM
2,587 posts

New Custom Account Tab


Jamroom Developers

So this is the function
/**
 * Updates an Item in a module datastore
 * @param string $module Module the DataStore belongs to
 * @param int $id Unique ID to update
 * @param array $_data Array of Key => Value pairs for insertion
 * @param array $_core Array of Key => Value pairs for insertion - skips jrCore_db_get_allowed_item_keys()
 * @return bool true on success, false on error
 */
function jrCore_db_update_item($module, $id, $_data = null, $_core = null){
    $func = jrCore_get_active_datastore_function($module, 'db_update_item');
    return $func($module, $id, $_data, $_core);
}
So it needs to be passed the parameters in this order - the module name (which you have), then the item id, then the data array.

You pass in the data array instead of the item id. Do you have the item_id in your fdebug? If so, try jrCore_db_update_item('myCustomModule', $_data['item_id'], $_data);
SteveX
@ultrajam
03/12/19 02:34:09AM
2,587 posts

New Custom Account Tab


Jamroom Developers

Use fdebug to write variables to the log.
fdebug($_post);
    $_data = jrCore_form_get_save_data('myCustomModule', 'settings', $_post);
fdebug($_data);
SteveX
@ultrajam
02/28/19 12:50:16PM
2,587 posts

New Custom Account Tab


Jamroom Developers

$pid is empty, so you don't get any profile info, but that doesn't matter because you don't do anything with it anyway.

You set $_data to be an empty array, but that doesn't matter because you don't do anything with it either.

You don't save anything (which is why the datastore is empty, although it would still be empty if you did save as your $_data array is set to be empty).

Then you set the form notice to notify you of success, which is why you see the success message.

So you didn't do anything apart from setting a success message, which is why you see that.
SteveX
@ultrajam
02/20/19 05:09:06AM
2,587 posts

transferring lifestream to another jamroom account


LifeStreams

Which accounts are you moving it between?
SteveX
@ultrajam
02/08/19 09:01:18AM
2,587 posts

same templates used diferent results based on smarty calls (only diference was cloning)


Using Jamroom

soaringeagle:not sure the best way to find it without even knowing the post titles
You can find them by their id.
soaringeagle:im thinking its a bug in the call or the cloning process, or who knows
It's because the replies are different - they don't have titles pr categories so that information can't be displayed.

If you want to not show any of the items which don't have a title, you could try something along these lines:
search="forum_title not_like %_%"
SteveX
@ultrajam
02/07/19 05:41:54PM
2,587 posts

same templates used diferent results based on smarty calls (only diference was cloning)


Using Jamroom

Search one of the problem posts for forum_cat in the debug you posted, it isn't there. You can try checking for it in the database as well, it probably won't be there either.
SteveX
@ultrajam
02/07/19 05:40:00PM
2,587 posts

same templates used diferent results based on smarty calls (only diference was cloning)


Using Jamroom

Yes, as you can see, those variables are missing in the posts that are acting up.
SteveX
@ultrajam
02/07/19 05:22:06PM
2,587 posts

same templates used diferent results based on smarty calls (only diference was cloning)


Using Jamroom

Put a debug in the template to see what the differences are.
  4