? Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
19 Sep 2018

Summary of Changes

This a try to to replace chosen.js to choice.js.

  • Module position field
  • Tags field
  • Category field
  • Filter fields

@wilsonge is any else field is missed in the list?

Testing:

Module editing: create custom position, search existing positions
Article editing: test Tag field, test category field
Articles filter: test the filter by multiple category, Tag, etc,

Everything should work as before the patch.

Documentation Changes Required

maybe

avatar Fedik Fedik - open - 19 Sep 2018
avatar Fedik Fedik - change - 19 Sep 2018
Status New Pending
avatar Fedik Fedik - change - 19 Sep 2018
The description was changed
avatar Fedik Fedik - edited - 19 Sep 2018
avatar joomla-cms-bot joomla-cms-bot - change - 19 Sep 2018
Category Administration com_modules Language & Strings Repository JavaScript
avatar Fedik Fedik - change - 19 Sep 2018
The description was changed
avatar Fedik Fedik - edited - 19 Sep 2018
avatar brianteeman
brianteeman - comment - 19 Sep 2018

ooh getting excited - on my to do list for tomorrow

avatar Fedik Fedik - change - 20 Sep 2018
Labels Added: ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 20 Sep 2018
Category Administration com_modules Language & Strings Repository JavaScript Administration com_categories com_content com_modules Language & Strings Repository JavaScript Layout Libraries
avatar Fedik Fedik - change - 20 Sep 2018
The description was changed
avatar Fedik Fedik - edited - 20 Sep 2018
avatar Fedik Fedik - change - 20 Sep 2018
The description was changed
avatar Fedik Fedik - edited - 20 Sep 2018
avatar Fedik Fedik - change - 22 Sep 2018
The description was changed
avatar Fedik Fedik - edited - 22 Sep 2018
avatar Fedik
Fedik - comment - 22 Sep 2018

@brianteeman can you please tell when exactly you got that error? no such file or directory, open 'C:\htdocs\40\media\vendor\choices.min.js\css\choices.css
Maybe some screenshot.

I tried to build a couple times and cannot reproduce it currently.
I am not on Windows, maybe something platform specific.

avatar brianteeman
brianteeman - comment - 22 Sep 2018

It was part of the output of the npm i
I am on a train on a way to a sprint but as soon as I get there I will check this and provide more info

avatar brianteeman
brianteeman - comment - 22 Sep 2018
fs.js:145
    throw err;
    ^

Error: ENOENT: no such file or directory, open 'C:\htdocs\40\media\vendor\choices.min.js\css\choices.css'
    at Object.fs.openSync (fs.js:579:3)
    at Object.fs.writeFileSync (fs.js:1309:33)
    at files.forEach (C:\htdocs\40\build\build-modules-js\update.js:302:9)
    at Array.forEach (<anonymous>)
    at uglifyLegacyFiles (C:\htdocs\40\build\build-modules-js\update.js:294:9)
    at Object.copyAssets (C:\htdocs\40\build\build-modules-js\update.js:329:11)
    at Object.<anonymous> (C:\htdocs\40\build.js:65:22)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)
    at startup (internal/bootstrap/node.js:238:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! joomla@4.0.0 install: `node build.js --copy-assets && node build.js --build-check`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the joomla@4.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

image

avatar Fedik
Fedik - comment - 22 Sep 2018

@wilsonge I need to load the field from com_modules, in Module frontend editing form /components/com_config/forms/modules.xml I am doing with addfieldprefix:

<field
	name="position"
	type="ModulesPositionedit"
	label="COM_MODULES_FIELD_POSITION_LABEL"
	addfieldprefix="Joomla\Component\Modules\Administrator\Field"
/>

but nothing works, what is wrong?
Ignore, all is fine ?

avatar joomla-cms-bot joomla-cms-bot - change - 22 Sep 2018
Category Administration com_modules Language & Strings Repository JavaScript com_categories com_content Layout Libraries Administration com_categories com_content com_modules Language & Strings Repository JavaScript Front End com_config Layout
avatar joomla-cms-bot joomla-cms-bot - change - 22 Sep 2018
Category Administration com_modules Language & Strings Repository JavaScript com_categories com_content Layout Front End com_config Administration com_categories com_content com_modules Language & Strings Templates (admin) Repository JavaScript Front End com_config Layout
avatar Fedik
Fedik - comment - 22 Sep 2018

@brianteeman please try one more run,
I think I found a reason, and made a fix, but cannot test my own

avatar brianteeman
brianteeman - comment - 22 Sep 2018

Sorry that change didnt work

Buiild with the latest change produced a css file with the content just the word "undefined" and a blank minified css file

avatar Fedik
Fedik - comment - 22 Sep 2018

okay, thanks,
and the error with not found ...media\vendor\choices.min.js\css\choices.css is gone or still there?

avatar brianteeman
brianteeman - comment - 22 Sep 2018

that error is gone

avatar Fedik
Fedik - comment - 22 Sep 2018

okay, then that error fixed ?

now, what is file path/name which contain "undefined"?

avatar joomla-cms-bot joomla-cms-bot - change - 22 Sep 2018
Category Administration com_modules Language & Strings Repository JavaScript com_categories com_content Layout Front End com_config Templates (admin) Administration com_banners com_categories com_config com_contact com_content com_fields com_modules
avatar Fedik Fedik - change - 22 Sep 2018
Title
[4.0][WIP] Replace chosen.js to choice.js
[4.0] Replace chosen.js to choice.js
avatar Fedik Fedik - edited - 22 Sep 2018
avatar Fedik Fedik - change - 22 Sep 2018
The description was changed
avatar Fedik Fedik - edited - 22 Sep 2018
avatar brianteeman
brianteeman - comment - 22 Sep 2018

C:\htdocs\40\media\vendor\choices.js\css\choices.css

avatar Fedik
Fedik - comment - 22 Sep 2018

I think it ready to test, if there someone brave enough :neckbeard:

Would be good if someone who have a Windows, to look at build failure, under Windows.
I cannot find why \media\vendor\choices.js\css\choices.css become empty after build.

avatar wilsonge
wilsonge - comment - 23 Sep 2018

OK So I just did a quick test here and things seems to work for module positions, tags and categories. There is a change here in that before we used to do ajax searching on tags after 3 characters were entered - now we are just loading all the tags in the system. But this is looking good. We obviously need to get windows sorted

avatar Fedik
Fedik - comment - 23 Sep 2018

There is a change here in that before we used to do ajax searching on tags after 3 characters were entered

it stays, it search with ajax (you can see ajax request in network tab)
the tags you see initially is actually loaded by Tags field (see getOptions()), it always was like that, and I always was wondered why we have it additionally to ajax ?

maybe we can disable AJAX for tag field then? or disable getOptions() for tag field?

avatar Fedik Fedik - change - 24 Sep 2018
Labels Removed: ?
avatar Fedik
Fedik - comment - 24 Sep 2018

@wilsonge I have update AJAX search, now the remote search enabled when
'tag_field_ajax_mode' == 1 (com_tags global Params) or field has attribute remote-search="true"

avatar laoneo
laoneo - comment - 28 Sep 2018

Can we get here some tests? Thanks

avatar brianteeman
brianteeman - comment - 28 Sep 2018

@laoneo it doesnt work in windows - waiting for @wilsonge to use my windows computer

avatar laoneo
laoneo - comment - 18 Oct 2018

Could you guys sort out the windows issue?

avatar brianteeman
brianteeman - comment - 18 Oct 2018

I am still here waiting for @wilsonge to use my computer

avatar wilsonge
wilsonge - comment - 18 Oct 2018

I'm off work today. Around till 5pm. Pinged you on twitter

avatar wilsonge
wilsonge - comment - 18 Oct 2018

Spent some time today with Brian. He should be submitting a PR later

avatar brianteeman
brianteeman - comment - 18 Oct 2018

For reference the problem is not with this PR but the build scripts on windows.

That will be a seperate PR I will submit tonight and doesnt really prevent this one fromm being merged

avatar brianteeman
brianteeman - comment - 18 Oct 2018

I am getting this error when opening an article with some fields

Warning: DOMDocument::loadHTML(): Tag joomla-field-fancy-select invalid in Entity, line: 2 in C:\htdocs\40\administrator\components\com_fields\Helper\FieldsHelper.php on line 315

avatar brianteeman
brianteeman - comment - 18 Oct 2018

see #22706 for the corrected(?) build script

avatar Fedik
Fedik - comment - 19 Oct 2018

I will check this weekend, also the conflicts

avatar brianteeman
brianteeman - comment - 19 Oct 2018

I "think" the error is related to the calendar field

avatar Fedik
Fedik - comment - 19 Oct 2018

I am getting this error when opening an article with some fields

@brianteeman please tell me which field types do you have in that article?

avatar Fedik
Fedik - comment - 19 Oct 2018

@laoneo do you remember what this thing is doing?

$xml = new \DOMDocument;
$xml->loadHTML($formField->__get('input'));
$options = $xml->getElementsByTagName('option');

the warning because DOMDocument not know about a custom tags, hm

avatar brianteeman
brianteeman - comment - 19 Oct 2018

There were two fields. Calendar and text

avatar Fedik
Fedik - comment - 20 Oct 2018

@brianteeman should work now

avatar brianteeman
brianteeman - comment - 21 Oct 2018

@Fedik yes that problem has been resolved - thanks

avatar wilsonge
wilsonge - comment - 24 Oct 2018

So just to be clear is this PR now working (with a bit of a grim hack to the DomDocument stuff?)

avatar Fedik
Fedik - comment - 24 Oct 2018

for me, working :)

avatar wilsonge wilsonge - change - 11 Nov 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-11-11 14:45:37
Closed_By wilsonge
avatar wilsonge wilsonge - close - 11 Nov 2018
avatar wilsonge wilsonge - merge - 11 Nov 2018
avatar wilsonge
wilsonge - comment - 11 Nov 2018

Thankyou for this!

avatar infograf768
infograf768 - comment - 18 Dec 2018

As stated in #23289, choices.css is loaded after template.css, therefore overriding specific overrides in template.css

Add a Comment

Login with GitHub to post a comment