2 / 18
Oct 2019

Hi,

I’m not able to change default state and add values to “Custom fields, type and status” in InfoLog settings.
If I change default state and hit save, page refreshes and reload old value.
Also, I’m able adding a new infolog type, but I can’t delete it.
I allowed popups in my browser.
Egrouware latest version. Tested with different browsers on different machines.

Any help? :\

  • created

    Oct '19
  • last reply

    Oct '19
  • 17

    replies

  • 2.4k

    views

  • 4

    users

  • 6

    links

Hi GianL,

please document this with screenshots. And please do it one by one. This is too much at one time.
Of course all this can have the same cause…

What is “latest” in a few weeks?
Please always specify the version and the type of installation you have made.
More here:

Regards
Stefan

Sorry.

Which version (from admin/change log and versions)? egroupware-docker (19.1.20190925) hardy; urgency=low

Installation type: package installation

Does the error occur after an update? No, also before last update.

Are there any references in the web server error log?

Which database is used: MySQL

Which web server is used: Apache

Which version of PHP is used? PHP Version 7.3.11-1+ubuntu18.04.1+deb.sury.org+1

This is from console when I choice an element in “Infolog - type” listbox:

This after hit “save” button:

Hi,

We have a fix already for similar issue for storing custom type status, although it’s not yet into the latest released version.

Since your described issue is not reproducible in our side I would recommend you to wait for the next maintenance release to get that particular patch into your instance and see if that covers yours.

Best regards,
Hadi

If you think it is useful, I can manually apply this patch and report you if it works for my iussue.

That makes sense.

I wrote you in an earlier chat how to do that:

Of cause replacing the Git hash with the one from Hadi’s post.

Ralf

Hi @hadi.nategh,

I applied your patch and now I can set default state.
But there il also the issue about trying to delete a custom infolog-type

When I change item in listbox, I have this in console:

Then, if I push delete button, nothing happens

image

(neither in console, no new lines).

Hi,
I am glad to hear that patch helped to set the default state.

One thing you may check is to make sure that you don’t use a custom template for template admin.customfields. You may check it by going to filemanager and browsing for path /etemplates/admin/templates/default.

Your posted screenshot of the JS console logs show no problem. Those warnings are fine. It would be more interesting to log XHR requests in your network tab and look for request json.php?menuaction=admin.admin_customfields.ajax_delete_type after you try to delete.

Please let me know the results.

Best regards,
Hadi

No custom template, fresh installation.

Here what you asked:

{"response":[{"type":"alert","data":{"message":"An error happened!\n\nToo few arguments to function admin_customfields::ajax_delete_type(), 0 passed and exactly 1 expected","details":""}}],"page_generation_time":"0.01","session_restore_time":"0.01"}

It seems that ajax_delete_type is missing its argument from client-side. Let’s do the following.
Before you hit the delete, open js console and run the below command and post the result.
jQuery.extend(
{},
app.admin.et2.getInstanceManager().getValues(app.admin.et2.getRoot()),
{appname: app.admin.et2.getRoot().getArrayMgr(‘content’).getEntry(‘content_types[appname]’)}
)
Also after delete action, please go back to network tab click on that ajax_delete_type and this time check for request payload (it’s under Headers tab) and see if there’s any parameters. (please post a screenshot if it’s possible)

Yes you did it right, it’s just the editor here messed up the quotations after I pasted it. please replace the single quotes used in the statement before you run it.

Or copy this one, it’s already wrapped as code correctly.

jQuery.extend(
	{},
	app.admin.et2.getInstanceManager().getValues(app.admin.et2.getRoot()),
	{appname: app.admin.et2.getRoot().getArrayMgr('content').getEntry('content_types[appname]')}
)

@hadi.nategh, it works :slight_smile:
A minor bug: after you delete a Type, listbox reloads all the items but firt one. If you change selected item again, it loads everything.

Thank to you for you wonderful work! I’m testing egroupware a lot in my office, so I think I’ll bother you again, often :wink:

I’m glad that worked for you :slight_smile:
Hmm… that doesn’t happen for me. Could you please make some screenshots of what exactly happens?

Best regards,
Hadi

image

image

image

now I delete “test”

image

ops, also “Email” is gone.

If you select another item:

image

it reappears :wink: