Jump to content

Adding Properties on Product Page does not work


csaggo.com
 Share

Recommended Posts

@kongondo

sorry to bother with another bug report.
On product-details i can not add properties in latest version. The search just wont start (i also see no activity in networks-tab in case it is ajax, the console also does not contain any js-errors)

The properties and dimensions are created and published.

 

Bildschirmfoto 2022-06-07 um 15.42.30.png

  • Like 2
Link to comment
Share on other sites

15 hours ago, csaggo.com said:

On product-details i can not add properties in latest version

I now get what you meant. I think the bug #1 below is what you meant?

This has now been fixed. Thanks for reporting.

15 hours ago, csaggo.com said:

The search just wont start

This is what confused me. I thought you meant you were able to add but not to search for dimensions. My mistake. It's all fixed now, thanks.

  • Thanks 1
Link to comment
Share on other sites

4 hours ago, csaggo.com said:

Thank you, my downloadlink still gives me the version of june 3rd tho. Can you check again please.

I always check before I make an announcement but I have checked again and it contains the correct files ?. There is only one changed file (InputfieldPadloperRuntimeMarkup.js) as the issue was caused by JavaScript. I am wondering if you browser is still serving previously cached values? Please let me know, thanks.

Link to comment
Share on other sites

18 hours ago, kongondo said:

I always check before I make an announcement but I have checked again and it contains the correct files ?. There is only one changed file (InputfieldPadloperRuntimeMarkup.js) as the issue was caused by JavaScript. I am wondering if you browser is still serving previously cached values? Please let me know, thanks.

allright i can confirm that the file is changed.

but it doesnt get loaded on that product detail / properties page (see screen)

Bildschirmfoto 2022-06-09 um 11.27.56.png

Link to comment
Share on other sites

6 hours ago, csaggo.com said:

but it doesnt get loaded on that product detail / properties page (see screen)

You are right. I should have been clearer. With respect to products, it will only get loaded if the product has the setting Enable Product Variants enabled.

In your case, I am still confused though.

  1. Are you able or not able to add properties?
  2. If the answer is no to #1, what happens  when you click on the link 'add new property'?
  3. If the answer to #2 is 'it adds a blank new property', is your issue then that when you type in either the 'property' or 'dimension' inputs, nothing happens?
  4. If you got to #4, does this happen to all products or main products or only products with variants?

Thanks.

Link to comment
Share on other sites

@kongondo

hi,

in this case i dont need product variants. Properties should be available anyways right? For variants i need attributes correct?

so
1. no i am not able to add properties to the product.
2. when i click add new property the form appears like in first screenshot 
3. exactly
4. did not try with variants, only have products without so far. i tried with variant article now and you are correct the js gets loaded in this case. but i think it always should be as properties should be allowed regardless of variants.

Link to comment
Share on other sites

@csaggo.com,

14 minutes ago, csaggo.com said:

Properties should be available anyways right?

Yes, and they are. Properties apply to the product page itself and not variants. So, to be crystal clear, properties are always available to all products as long as you selected the 'properties' feature when installing Padloper ?.

15 minutes ago, csaggo.com said:

For variants i need attributes correct?

Correct.

17 minutes ago, csaggo.com said:

2. when i click add new property the form appears like in first screenshot 

OK this and ...

17 minutes ago, csaggo.com said:

3. exactly

this...tell me your issue is not JavaScript related as per the #1 issue in the bugs and fixes thread.

Again (sorry) to be crystal clear, your issue is:

  1. You click on 'add new property'.
  2. A new blank row for properties is added to the DOM.
  3. You try to search for a property (e.g. Breite) or a dimension (e.g. Milli) BUT NOTHING happens.

Am I correct about 1 - 3 above? 

4. Secondly, has this worked previously then it stopped working? 

Thanks.

Link to comment
Share on other sites

17 minutes ago, kongondo said:

 

Again (sorry) to be crystal clear, your issue is:

  1. You click on 'add new property'.
  2. A new blank row for properties is added to the DOM.
  3. You try to search for a property (e.g. Breite) or a dimension (e.g. Milli) BUT NOTHING happens.

Am I correct about 1 - 3 above? 

4. Secondly, has this worked previously then it stopped working? 

Thanks.

 

Yes exactly for 1-3

4. i am not entirely sure but i think it actually did work at some point when i was playing around with it after first installing it. cant tell 100% to be honest.

I also tried again with product settings to variants -> YES and even tho the markup js gets loaded, still nothing happens when i type the Property Name

Link to comment
Share on other sites

22 hours ago, csaggo.com said:

I also tried again with product settings to variants -> YES and even tho the markup js gets loaded, still nothing happens when i type the Property Name

@csaggo.com

Thanks. Yes, like I stated, your issue is not related to JavaScript at all from what I can see.

22 hours ago, csaggo.com said:

Yes exactly for 1-3

Thanks for confirming. This is indeed strange since the search for dimensions and properties is powered by ProcessWire itself. They are direct implementations of InputfieldPageAutocomplete. I don't think it is a language issue either as the selector passed to them is their template. I am wondering whether the dimension and property pages you created are not activated (by Padloper). Is this a multilingual site?

Link to comment
Share on other sites

  • 4 weeks later...

Hi @kongondo

sorry for delay was on vacation.

i have just retried with padloper 002 but still no search happening when i type.

Language Support is installed but only default language exists (we have imported german translations)

PW is latest DEV (3.0.201)

Link to comment
Share on other sites

On 6/9/2022 at 11:25 PM, kongondo said:

@csaggo.com

I am wondering whether the dimension and property pages you created are not activated (by Padloper). 

They are activated in the sense of beeing published. Can i see somewhere in the database if activated by Padloper?

But i dont think thats the issue. As mentioned i monitored Networking in Debug Tools when typing in and there is no Ajax Request happening so it does not even try to find something.

Link to comment
Share on other sites

/processwire/page/search/for?template=padloper-dimension&limit=50&status<8192&get=title

this is the link, the autocomplete has in his attribute to search. if i past this manually i find my properties. 

so they are definitly published and would show up if only the search would start.

Link to comment
Share on other sites

@kongondo

it is in fact a JS issue: 
when i klick the little x on the right in order to clear the field, also nothing happens. It looks to me as if there simple all event-listeners missing for the input.

EDIT: also the trash icon on the very right (to remove the whole property line) does not react on click.  
308491276_Bildschirmfoto2022-07-06um14_45_58.png.24401dce8156e9500053077557deee94.png

Link to comment
Share on other sites

Hi @csaggo.com,

2 hours ago, csaggo.com said:

it is in fact a JS issue: 
when i klick the little x on the right in order to clear the field, also nothing happens. It looks to me as if there simple all event-listeners missing for the input.

I'm stumped on this one as I cannot replicate and this is a ProcessWire core Inputfield. In addition there are no JS errors to help us.

3 hours ago, csaggo.com said:

this is the link, the autocomplete has in his attribute to search. if i past this manually i find my properties. 

Yes. This is inserted by ProcessWire itself.

2 hours ago, csaggo.com said:

EDIT: also the trash icon on the very right (to remove the whole property line) does not react on click. 

That's doesn't work if there is no current saved property (i.e. it won't delete and empty property line). So, that's the expected behaviour.

The only thing I can think of now is to request other users to test on their environments. That will tell us if the issue is local to your environment, at least. I can also check your setup again if I can get access but not sure that is immediately helpful.

@Jan Fromm, @Kholja, @alexm. Sorry to tag you like this. With respect to the issue above, are you able to please test if adding properties to products works in your case? Does the search kick in? Many thanks.

Link to comment
Share on other sites

@kongondo
More debugging:

i changed the core InputFieldPageAutocomplete.js - init Method like this:

 

init: function (id, url, labelField, searchField, operator) {
		var $value = $("#" + id);
		var $ol = $("#" + id + "_items");
		var $input = $("#" + id + "_input");

		alert("changing");
		console.log(document.getElementById(id + "_input"));
		var newId = "testCsam" + Date.now();
		$input.attr("id", newId);
		console.log(document.getElementById(newId));
		return;

When i open the product page i get the alert "changing" two times (once for Brand and once for Type in Classifcation tab) 

When i then add a line in Properties tab I also get the alert two times as expected (once for Property and once for Dimension)

See the console output in the screenshot:

821760530_Bildschirmfoto2022-07-06um21_53_48.thumb.png.3aebbd6f5ae37d36cdab5cc47b95b972.png

for the classification fields everything works, the id is changed to my test id afterwards and the element is found. if i inspect the element i also see my test-id

for the two properties-fields you first see that the console-log output allready looks different. and most importantly the element with the test-id is not found. It is also not changed when i inspect it.
i dont know enough about htmx and its afterSwap but whatever is done in the triggered init-method is obviously not applied to the final dom-elemnt(s) (including eventlisteners) and does not work.

Link to comment
Share on other sites

6 minutes ago, Jan Fromm said:

Just tested it, I can add properties and dimensions, search is working fine.
Padloper 0.0.2, version from 27 June
PW 3.0.184

hi @Jan Fromm

thanks for sharing. so the obvious difference is that i have pw 3.0.201 
will try with older version.

Link to comment
Share on other sites

1 hour ago, csaggo.com said:

so the obvious difference is that i have pw 3.0.201 
will try with older version.

Somebody else has tested on 3.0.200 and it works fine. The only main difference I know of so far is both @Jan Fromm and the other tester's sites are not multilingual or at least currently have English as the default language. Might not be related, but worth mentioning.

I'd also like to rule out any other third-party modules you might have maybe?

Link to comment
Share on other sites

  • 3 months later...

@kongondoits been a while sorry.

 

Quote

the other tester's sites are not multilingual or at least currently have English as the default language. Might not be related, but worth mentioning.


so i just added language english and switched my user profile to it. and .... it works with english. so it is in fact a multilanguage issue.

to reproduce -> activate language support. Have only default-language in place and import the translation files: https://processwire.com/modules/german/

EDIT: Additional info. Once i had a property on the product, set my profile to german again, edited the same product, the search works fine for the existing property. But when adding another one, it does not work on the new one.

So very specifically, it does not work on newly added property-line when the language is not english.

  • Like 1
Link to comment
Share on other sites

On 10/20/2022 at 1:24 AM, csaggo.com said:

i just added language english and switched my user profile to it. and .... it works with english. so it is in fact a multilanguage issue.

@csaggo.com. Great find! Thanks for looking into this.

I'll try to reproduce. Please clarify this:

On 10/20/2022 at 1:24 AM, csaggo.com said:

to reproduce -> activate language support. Have only default-language in place and import the translation files: https://processwire.com/modules/german/

Do I?

  1. Install ProcessWire and select a non-language profile.
  2. Activate language support (not sure how to do this - never done it before; are there instructions somewhere? thanks)
  3. Default-language in place: is this English?
  4. Import translation files: Never done this before. A hint or guide would be helpful, thanks...
Link to comment
Share on other sites

On 10/21/2022 at 3:47 PM, kongondo said:

Do I?

  1. Install ProcessWire and select a non-language profile.
  2. Activate language support (not sure how to do this - never done it before; are there instructions somewhere? thanks)
  3. Default-language in place: is this English?
  4. Import translation files: Never done this before. A hint or guide would be helpful, thanks...

@kongondo
1. yes, i just install blank profile for start usually (not sure about newest dev, if there are any profiles anymore, but it doesnt matter just a minimal pw-install with no language support)
2. in module core-modules just install/activate "Languages Support"
3. in setup-menu in addition to fields, templates and so on you now have languages with only one language (default) which is english
4. in  setup for default language on the bottom there is a file field to upload core-translation files (there is also a link to the available language packs). Just upload the zip file for Deutsch right here, your backend is now translated to german.

optional 5: in order to be able to navigate as you are used to you can add another language (english) just add english and dont upload a translation pack there. so it will be english as in default. You can switch in your user profile.

  • Like 1
Link to comment
Share on other sites

  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...