[Not a bug] Bug and error when adding music type product
Using a fresh install of a cloned bootstrap on 1.5.8, php 8.0, with newest xampp and current version of windows 10...Firefox browser.
I am in the process of integrating my 1.5.7d into 1.5.8 and ran into two problems when adding the initial music type product in 1.5.8. My category structure is Music>Artist>Product.
1. There is not enough spaces allocated for the artists website input box on the admin product page...it stops taking input after 8 keystrokes.
2. Error log. Recording artists do not have a manufacturers but they do have a recording company.
--> PHP Warning: Undefined array key "manufacturers_id" in C:\xampp\htdocs\MY_WEBSITE\MY_ADMIN\includes\modules\update_product.php on line 44.
Not sure if the two are related...
The problem persists when I change to Classic Green Template.
I have integrated admin changes but not many catalog changes because the bootstrap appears to be as good or better than the mods I have made over the years. Great job on that!
The admin changes I have implemented only deal with using cloud based images in admin and shouldn't cause the two problems I am reporting here. The changes simply strip the local image directory out of the link and the init_includes has a couple of things commented out to allow http images.
If I find the cause or fix for these two issue, I will post them here.
I hope this is not a duplicate. I did a search for "music type product" and came up empty.
Re: Bug and error when adding music type product
It is not just happening on the admin music type product page...product free shipping is also affected.
Recommend all product types be looked at.
And to clarify...this is the input box with the problem:
HTML Code:
Products URL:(without http://)
Re: Bug and error when adding music type product
All product types except Product General are affected.
Re: Bug and error when adding music type product
> 1. There is not enough spaces allocated for the artists website input box on the admin product page...it stops taking input after 8 keystrokes.
Could not reproduce.
> 2. Error log. Recording artists do not have a manufacturers but they do have a recording company.
You are somehow setting products_type to 1 and music products should be products_type 2.
Perhaps you did a restrict product type (or similar) by accident?
https://docs.zen-cart.com/user/produ...type_restrict/
Re: Bug and error when adding music type product
Quote:
Originally Posted by
swguy
> 1. There is not enough spaces allocated for the artists website input box on the admin product page...it stops taking input after 8 keystrokes.
Could not reproduce.
> 2. Error log. Recording artists do not have a manufacturers but they do have a recording company.
You are somehow setting products_type to 1 and music products should be products_type 2.
Perhaps you did a restrict product type (or similar) by accident?
https://docs.zen-cart.com/user/produ...type_restrict/
The restriction was not accidental. I created Music with subcategories and restricted it to Music Type intentionally because that is all I want in the subfolders.
I just tested creating a category without the restrictions and I still have the same problem...except now Product General is not letting me type in the Products URL.
So all product types are not letting me manually input the Products URL.
All of my other products are loaded to the database with the plugin I have been working on for years. They show up fine on the product page.
I just can't manually type the URL...I smell a stinking sanitization problem. LOL
Re: Bug and error when adding music type product
FWIW, I just applied a products URL to a copy of the demo music product. Was the site in question an upgrade or a fresh install? The handling of the product_music type products changed in zc158 to make use of the base product update/delete type methods where possible and you might have left-overs if you didn't remove now unused files during an upgrade.
Re: Bug and error when adding music type product
The system timed me out and cut off my reply so here it all is again.
Page Source is showing the maxlenth as 8...
HTML Code:
<div class="form-group">
<p class="col-sm-3 control-label">Products URL:<span class="help-block"><small>(without http://)</small></span></p>
<div class="col-sm-9 col-md-6">
<div class="input-group">
<span class="input-group-addon">
<img src="https://localhost/zc_158_bs/includes/languages/english/images/icon.gif" alt="English" title="English"> </span>
<input type="text" name="products_url[1]" size="9" [B]maxlength="8" [/B]class="form-control" inputmode="url">
</div>
<br>
</div>
</div>
The developers tool kit turns up nothing when searching for maxlength="8" so I assume "8" is set by some other method, variable, function or constant.
It looks like collect_info.php calls on function zen_set_field_length (admin/includes/general.php) which in turn calls on function zen_field_length (includes/functions_general_shared.php) which in turn calls on $rs = $db->MetaColumns($tbl); (includes/classes/db/mysql/query_factory.php) and it polls the information schema for the number. 65535 is the maximum size since it is text.
That is as far as I can get in tracing down the problem...where and what is changing 65535 to 8?
I would like to know how the field maxlength is being set and if this is a bug or not. It is a bug to me because I can not manually type the products url in the admin product page.
Thanks.
Re: Bug and error when adding music type product
Quote:
Originally Posted by
lat9
FWIW, I just applied a products URL to a copy of the demo music product. Was the site in question an upgrade or a fresh install? The handling of the product_music type products changed in zc158 to make use of the base product update/delete type methods where possible and you might have left-overs if you didn't remove now unused files during an upgrade.
It is a fresh install on Windows 10 and using XAMPP using a cloned copy of the bootstrap plugin...but the problem remains no matter which template I use.
There are so many changes to 1.5.8 that I decided to just go with a fresh install and redo all of my mods.
Re: Bug and error when adding music type product
Hmm, that's bizarre. Let me poke around a bit and see if I can come up with anything in the morning.
Update: Just saw your previous post. When you view the products_description table, via phpMyAdmin, what's the configuration for the products_url field?
Re: Bug and error when adding music type product
Quote:
Originally Posted by
mikeel100
It is a fresh install on Windows 10 and using XAMPP using a cloned copy of the bootstrap plugin...but the problem remains no matter which template I use.
There are so many changes to 1.5.8 that I decided to just go with a fresh install and redo all of my mods.
What about the database? Is it a blank or demo database?
As described, the issue is that you are getting to line 995 from the following:
https://github.com/zencart/zencart/b....php#L967-L997