Item Form - add new item, required element is not enforced

1 year 2 months ago - 1 year 2 months ago #68766 by lomuyeh
I created a test page, copied the html code of add item form, and try to figure which js causing this.

I found that:
/media/system/js/core.js

If core.js is loaded before admin.js, the form is OK.
If core.js is loaded after admin.js, the form is not OK.

Basically, the core.js is loaded before admin.js. But some modules load admin.js again, and after admin.js.

This is what I found. See if this helps.

Thanks,
Lomu

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

1 year 2 months ago #68768 by ggppdk
Hello

code is admin.js file
is overriding code in core.js

i will see why it is loaded after admin.js


-- 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 review. Thanks!

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

1 year 2 months ago - 1 year 2 months ago #68769 by lomuyeh
Hi
If I disable some modules, like CB login, core.js won't be loaded again after admin.js.
So if I disable these modules, the form is OK.

<script src="core.js"></script>
<script src="admin.js"></script>

So I think the overriding is OK.

If I enable these modules, core.js will be loaded after admin.js again, at almost the end of js loading lines.

Like this:

<script src="core.js"></script> <-- this one is loaded by system I think
<script src="admin.js"></script> <-- this one is loaded by flexicontent
<script src="core.js"></script> <-- this one should be loaded by module

The core.js is loaded again, so the overriding is be overrided again I think.

I hope this helps.

Thanks,
Lomu

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

1 year 2 months ago #68780 by ggppdk
Hello

it seems that the module could be adding the core.js file without call the Joomla API

i will check if it is the above is true


-- 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 review. Thanks!

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

1 year 2 months ago #68782 by ggppdk
Hello

the problem is that some extensions will use "absolute URL path" for adding some files
(adding the domain name)

www.dddooommmain.com/ ...

instead of the correct way of using URL withou the domain name starting with just:
/...

The above result in some JS files being double loaded !!


-- 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 review. Thanks!

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

1 year 2 months ago #68783 by ggppdk
In your case it seems to be happening by the com_bruce component


-- 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 review. Thanks!

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

1 year 2 months ago #68785 by ggppdk
Hello

a sidenote
after the forms submits with some required fields missing, e.g. title
-- then it will not save , but just reload

in your case the message is not shown because your Joomla template seems not to have the
"system messages position" ?


-- 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 review. Thanks!

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

1 year 2 months ago - 1 year 2 months ago #68796 by lomuyeh
Hi
I found what make it happened.

A plugin called 'AcyMailing CB Plugin' of CB.
I disabled it and that line disappeared.

And I found that acymailing loads the core.js by using the domain name, not the '..' .
The modules I mentioned: CB_login and Kunena Latest, all connect to CB. So I think that's why they double load the core.js.

So I think it may be the problem of acymailing.

Thanks,
Lomu

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

1 year 2 months ago - 1 year 2 months ago #68797 by lomuyeh
I found a file: /administrator/component/com_acymailing/compat/joomla.php

There is a line:
if(ACYMAILING_J16 && file_exists(ACYMAILING_ROOT.'media'.DS.'system'.DS.'js'.DS.'core.js')) acymailing_addScript(false, rtrim(acymailing_rootURI(), '/').'/media/system/js/core.js?v='.filemtime(ACYMAILING_ROOT.'media'.DS.'system'.DS.'js'.DS.'core.js'));

Seems it will load core.js anyway, even I modified the file path to /media/system/js/core.js

I can disable this line and everything going well. But I don't know if there will be some other problems occur.

I think I have to ask acymailing for it, but any idea?

Thanks,
Lomu

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

1 year 2 months ago #68803 by ggppdk
Hello

you can report a bug for this to ACYMail author

Saying that this is not the proper way to load the file
and also says it results in double loading of the file

on our side i will check to see if we can override the file
both during file loading and on-document-ready event ...


-- 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 review. Thanks!

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

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.