News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Categories problems after update to 3.2.0

Started by Geppux, March 27, 2017, 18:50:43 PM

Previous topic - Next topic

Milbo

Quote from: solarangellis on March 20, 2018, 18:07:42 PM
I had the same problem, after 3 days of going crazy and testing, modifying, reading etc, i kinda figure it out .
all the little crocks and screws that make  Joomla and VirtueMart works are version dependent .

Of course, any version is different and one of the reason is to fix problems, which appear due new joomla versions.

Quote from: solarangellis on March 20, 2018, 18:07:42 PM
After i had the "F**ck IT " moment ,and some "AHA" moment i decided downgrade the current version that i had. I thought that " if worked perfectly with older version, ill keep the older version till they find a fix " .
Prior to this i had Joomla update, witch was Joomla 3.8.6.

In this case, joomla has nothing todo with it, as far as I know. There is also no problem in VM. The problem with the ajax category feature is
a) an installed server mode, which uses page caches extraordinary
b) a browser plugin or configuration, which uses the browser cache extraordinary
c) a joomla extension, which enables own caches
d) a 3rd party component which breaks the js on your page (that was the case of Kamnaderi).

I would start with D) actually.

Quote from: solarangellis on March 20, 2018, 18:07:42 PM
i took a look at stable pack of VM that comes with Joomla and i noticed something.....
Full installer includes Joomla 3.8.3 with VirtueMart 3.2.12 installed. And there was my AHA moment.

When updating current Joomla, take a look what VM works with what. if things get screw-y ...downgrade.
Hope it helps someone else in the future.

So you say downgrading to joomla 3.8.3 solved your problem? That is indeed very strange. Maybe 3rd party component, which uses js creates an error with later joomla version. I think they upgraded the jQuery.min version. Probably the problem is there.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

Quote from: Milbo on March 21, 2018, 09:48:38 AM

In this case, joomla has nothing todo with it, as far as I know. There is also no problem in VM. The problem with the ajax category feature is
a) an installed server mode, which uses page caches extraordinary
b) a browser plugin or configuration, which uses the browser cache extraordinary
c) a joomla extension, which enables own caches
d) a 3rd party component which breaks the js on your page (that was the case of Kamnaderi).
E) Most time, it's when you activate PHP debug error. Any PHP displayed error break any json, not only Virtuemart, but other Joomla extensions do not use Json(or only some)
So check if you dont actiavted PHP errror in Joomla config and set it to 'none'

solarangellis

#107
Quote from: Milbo on March 21, 2018, 09:48:38 AM
So you say downgrading to joomla 3.8.3 solved your problem? That is indeed very strange. Maybe 3rd party component, which uses js creates an error with later joomla version. I think they upgraded the jQuery.min version. Probably the problem is there.

Yea, ill have to take that back. Problem is still there. (  tho it did work for a while, but now it's back to it's old tricks again )
So:
New product -> Select category dosent work .
Old product -> it dose show in witch category it is . Select some +other category and save -> works . (kinda, sometimes save, sometimes jumps out of any category, save, category still there, or it jumps it out. )
Old product  with no category -> ...don't get me started.



the "getCategoriesTree&virtuemart_product_id=155&format=json" - it works , it calls the category-tree.  so the Category Tree is there. but is not being feed or w/e. (  ???  )


mkay, this being said.

Ive look around in product_edit_information.php and got me curious .   Za code that makes " Select Manufacturer "  works like a charm.  Tho  " Select Categories" is f**ing picky, screwy, and whatnot .
And this code is from VirtueMart3.2.12_Joomla_3.8.3-Stable-Full_Package (  \administrator\components\com_virtuemart\views\product\tmpl ) that calls the manufacturer to be selected in the product info.

<tr class="row<?php echo $i?>">
<?php if(isset($this->lists['manufacturers'])) { ?>
<td>
<?php echo vmText::_('COM_VIRTUEMART_MANUFACTURER'?>
</td>
<td>
<?php echo $this->lists['manufacturers'];?>
</td>
<?php } else {
echo '<td></td><td></td>';
}?>

<td>
<?php echo vmText::_('COM_VIRTUEMART_PRODUCT_DETAILS_PAGE'?>
</td>
<td>
<?php echo JHTML::_('Select.genericlist'$this->productLayouts'layout''size=1''value''text'$this->product->layout); ?>
</td>
<td>
<?php echo vmText::_('COM_VIRTUEMART_PRODUCT_FORM_URL'?>
</td>
<td>
<input type="text" class="inputbox" name="product_url" value="<?php echo $this->product->product_url?>" size="32" maxlength="255" />
</td>
</tr>


and down below , this is the code that calls for Category


<tr class="row<?php echo $i?>">
<td>
<?php echo vmText::_('COM_VIRTUEMART_CATEGORY_S'?>
</td>
<td>
<select class="vm-drop" id="categories" name="categories[]" multiple="multiple"  data-placeholder="<?php echo vmText::_('COM_VIRTUEMART_DRDOWN_SELECT_SOME_OPTIONS')  ?>" size="100" >

</select> </td>
<?php
// It is important to have all product information in the form, since we do not preload the parent
// I place the ordering here, maybe we make it editable later.
if(!isset($this->product->ordering)) {
$this->product->ordering 0;
?>
<input type="hidden" value="<?php echo $this->product->ordering ?>" name="ordering"> <?php
?>

<td>
<span class="hasTip" title="<?php echo vmText::('COM_VIRTUEMART_SHOPPER_FORM_GROUP_PRODUCT_TIP'); ?>">
<?php echo vmText::_('COM_VIRTUEMART_SHOPPER_FORM_GROUP'?></span>
</td>
<td>
<?php echo $this->shoppergroupList?>
</td>
<?php if($this->showVendors()) { ?>
<td>
<?php echo vmText::_('COM_VIRTUEMART_VENDOR'?>
</td>
<td>
<?php echo $this->lists['vendors'];?>
</td>
<?php } else {
echo '<td><td>';
}?>

</tr>





to make it clear, and to point what bugs me. And if there is a problem or a small fix that it could be done, because honestly, iz driving me kinda insane.

Za code for Manufacturer
<td>
<?php echo vmText::_('COM_VIRTUEMART_MANUFACTURER'?>
</td>
<td>
<?php echo $this->lists['manufacturers'];?>
</td>

Za code for Category.

<td>
<?php echo vmText::_('COM_VIRTUEMART_CATEGORY_S'?>
</td>
<td>
<select class="vm-drop" id="categories" name="categories[]" multiple="multiple"  data-placeholder="<?php echo vmText::_('COM_VIRTUEMART_DRDOWN_SELECT_SOME_OPTIONS')  ?>" size="100" >

</select></td>


could be that is missing a <?php echo $this->lists['categories'];?>  or that "this"  is being feed via json or javascript ?



Also i have the :

Uncaught TypeError: Cannot read property 'VERSION' of undefined
    at bootstrap-tooltip-extended.min.js:6
    at bootstrap-tooltip-extended.min.js:6

Studio 42

The list is get by json for categories, not for manufacturers, so the code is completly different.
You have certainly a javascript problem, try to clear your cache and check if you ahve an error on loading page in the browser console

solarangellis

wouldn't be better if we reroute this thingie via same process (?) like the manufacturer ?
at least for this part ? for the edit product information?

Studio 42

Quote from: solarangellis on March 28, 2018, 12:42:00 PM
wouldn't be better if we reroute this thingie via same process (?) like the manufacturer ?
at least for this part ? for the edit product information?
The problem is that category tree can be very big. This is why they have changed it.
In my case it work in more then 10 websites i manage, so it should work for you.
Perhaps you use a cache or a plugin add some values or javascript conflict, but its not a core problem, i'm the first to report when i see a bug.

solarangellis

...sigh





LE: image uploaded twice, dunno why.

Studio 42

Is jQuery chosen loaded ?
You should have in head
<script src="/components/com_virtuemart/assets/js/chosen.jquery.min.js?vmver=236d5e81"></script>
If yes, Check if you have a 404 error for this file
If you have not a 404 then the script are not loaded in the right order
If this is not loaded, then you have disable it with a system plugin or perhaps in your Virtuemart config.

solarangellis

<script src="/components/com_virtuemart/assets/js/chosen.jquery.min.js?vmver=f51a2d79"></script>
Yes it is loaded.

solarangellis

Mkay, this is the source output for the " New Product" in virtuemart

" The message exceeds the maximum allowed length (20000 characters). " ... i tried to copy-paste the code. ugh.

Ok, i deleted everything that was html content and left only the scripts.
.....
still too large.

i uploaded the damn  thingie.

Studio 42

I dont have same script loaded in VirtueMart 3.2.12 but this have a little error:

<script id="updateChosen_js" type="text/javascript">//<![CDATA[
if (typeof Virtuemart === "undefined")
var Virtuemart = {};
Virtuemart.updateChosenDropdownLayout = function() {
var vm2string = {editImage: 'edit image',select_all_text: 'Select all',select_some_options_text: 'Available for all'};
jQuery("select:not(.vm-chzn-add)").chosen({enable_select_all: true,select_all_text : vm2string.select_all_text,select_some_options_text:vm2string.select_some_options_text,disable_search_threshold: 5});
//console.log("updateChosenDropdownLayout");
}
jQuery(document).ready( function() {
Virtuemart.updateChosenDropdownLayout($);
}); //]]>
</script>

Virtuemart.updateChosenDropdownLayout($); $ is not defined and can break in some browser

But your problem is certainly because this script, i dont have it in my case:
   <script src="https://www.mywebsite.ro/plugins/system/ytshortcodes/assets/js/loadconfig/shortcodes-backend.js"></script>
   <script src="/media/system/js/mootools-core.js?a3b577abad4a718677f8de790fee53c8"></script>
   <script src="/media/system/js/mootools-more.js?a3b577abad4a718677f8de790fee53c8"></script>
   <script src="/media/system/js/modal.js?a3b577abad4a718677f8de790fee53c8"></script>
mootools can conflict
shortcodes-backend ??? from ro (romania ?)
mootool modal that conflit with bootstrap modal.
You should check all plugin so this javascript are not loaded anymore and i think it work.
Note that Joomla backend dont need mootools anymore.

Milbo

Quote from: solarangellis on March 27, 2018, 12:19:39 PM
And this code is from VirtueMart3.2.12_Joomla_3.8.3-Stable-Full_Package (  \administrator\components\com_virtuemart\views\product\tmpl ) that calls the manufacturer to be selected in the product info.

....

Also i have the :

Uncaught TypeError: Cannot read property 'VERSION' of undefined
    at bootstrap-tooltip-extended.min.js:6
    at bootstrap-tooltip-extended.min.js:6


I wonder that you did not try to use the release candidate. Actually I found a problem with the category list using the FE managing, which is now fixed.

But the main problem seems to be here.
<script src="https://www.mywebsite.ro/plugins/system/ytshortcodes/assets/js/loadconfig/shortcodes-backend.js"></script>
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

solarangellis

3.2.14 did the trick. - love you guys.

i had to roll back everything, do the work, upgrade again and whatnot .
i still have no idea why or what was screwing with that thing in particular.
shortcodes-backend.js  this was not the culprit. i went and even wrote a custom php to block from getting loaded / integrated in the backend and still no dice .

shortcodes-backend ??? from ro (romania ?) - yea, the domain is romanian based. tho i have no idea why was it loading over like that, with the full domain attached to it .

escapezone

VirtueMart 3.2.14
Joomla 3.8.7
PHP 7.0.30

Hello!
I had the problem with category...
I mean i could not assign category to a product ...
At my demo site i had VirtueMart 3.2.14  and Joomla 3.8.6 , when i upgrade to Joomla 3.8.7 the problem was appear!

So i replace the /components/com_ajax/ajax.php (from 3.8.7) with the ajax.php from Joomla 3.8.6 version....
and i put this code that found on this topic at .htaccess

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On

# JSON no caching
ExpiresByType application/json                    "access plus 0 seconds"
ExpiresByType application/ld+json               "access plus 0 seconds"
ExpiresByType application/schema+json       "access plus 0 seconds"
ExpiresByType application/vnd.geo+json      "access plus 0 seconds"
ExpiresByType application/xml                     "access plus 0 seconds"
ExpiresByType text/xml                              "access plus 0 seconds"
</IfModule>


The problem solved!
But this .htaccess code i believed that works only with 3.8.6 Joomla ajax.php, I tested with 3.8.7 ajax.php and didn't worked.
I hope someone will found a permanent solution soon...
Thank you!
Regards!

stawebnice

in my case it was problem with live_site in configuration.php which was without www, so console was showing json was loading mixed content
when I changed that, it started working