[SOLVED] Subcategory list drop-down not updated when adding or deleting category

Started by SteP[IT], November 23, 2015, 13:11:40 PM

Previous topic - Next topic

SteP[IT]

Since few releases (currently using 3.0.12 on J 3.4.5, Firefox 42.0) I noticed an issue in subcategory drop-down list when adding or deleting categories.
If you add a new category or delete an old one, that change doesn't immediately appear into the subcategory drop-down list when adding a new category or modifing an old one. So If i add a category then look for it in drop down, it is not there, and if I delete a category I still find it listed in that dropdown.
I have no cache configured in Joomla (previously set to "PHP alternative" but currently disabled), no cache plugins active... this is weird when adding several categories, I have to modify the db table to assign any new one to it's correct parent, or wait until it will appear after long time
Is there a way to solve it?
Regards
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

SteP[IT]

I wrote in previous post that the cache is NOT activated. I have anyway cleaned that site and the browser cache
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

GJC Web Design

cats are always cached frontend if switched on or off in Joomla config

is the BE the same.?  see if vm cats files are formed in your cache/ folder
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

SteP[IT]

I presume it's a cache problem, but this should not be the right way to get category trees in backend: every time I add a new dir, I must look for cache and delete it, or wait until it will expire...
Could please Max help us to look in the right direction to solve this annoing feature?
I don't see any other report about this, so I can't understand if it's a voluntary designed way to work in BE or if it's a misconfiguration of my installation/webserver (latest Apache 2.4.x).
Any help will be really appreciated
Thank you in advance
Regards
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

balai

QuoteI presume it's a cache problem, but this should not be the right way to get category trees in backend: every time I add a new dir, I must look for cache and delete it, or wait until it will expire...
Could please Max help us to look in the right direction to solve this annoing feature?

It is definitely cache.
From my point of view there is no better approach than this.
If the categories are not save into cache then the whole tree has to be re-created every time somebody visits your site.
That means database queries, extra processes, cpu, ram...i.e. time

I don' t know if you are familiar with other systems like Magento.
There everything is cached and for every little change you have to refresh your cache

GJC Web Design

perhaps in the getcats function if this is what returns the admin cats

public function getCategories($onlyPublished = true, $parentId = false, $childId = false, $keyword = "", $vendorId = false)

around line 363  \administrator\components\com_virtuemart\models\category.php

$app = JFactory::getApplication ();
      
               if(!isset($cats[$hash]) || $app->isAdmin()){
         $cats[$hash] = $this->_category_tree = $this->exeSortSearchListQuery(0,$select,$joinedTables,$whereString,'GROUP BY virtuemart_category_id',$ordering );
      }

???  not tested in any way
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

SteP[IT]

Quote from: balai on November 24, 2015, 10:14:30 AM
Quote
I don' t know if you are familiar with other systems like Magento.
There everything is cached and for every little change you have to refresh your cache

I usually work on Magento too, for more complex sites.
But Magento has the clear cache function specifically forged to that purpose.
In my VM installation, I have ALL site caches OFF. How to clear the BE cat cache in that situation? I can't see any specific VM function to be used for.
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

jenkinhill

I have used this for sites where caching is an issue:  http://extensions.joomla.org/extension/cache-cleaner

It has a useful setting:  Cleans the cache if you save (or apply) something
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

SteP[IT]

Thank you jenkinhill, I'll give it a try.
But I suggest Max to consider this tread like a "feature request": VM backend should have it's proper way to clear cache, without the needing of using another extension :)
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

balai

You don't need a 3rd party to clean your cache.
Cache is a joomla component and has it's own section in the joomla backend
System > Clear Cache

AH

Regards
A

Joomla 4.4.5
php 8.1

jenkinhill

The advantage with the plugin is that you don't have to take any other steps, you just save or apply whatever you are doing and the cache is automatically cleared.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

SteP[IT]

uhm... do you read my post??? I have NO cache activated (no plugin, no joomla configurable cache, NOTHING). I can't simply clear the cache, I HAVE NO CACHE to delete.
Joomla cache is deactivated, template caches and plugin ones too...
It's an admin side problem, for me.
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

GJC Web Design

I wonder if YOU read our posts?

the cats cache is on and there... there is no config for it and the Joomla settings have nothing to do with it

look in your cache folder!  what do u see?  a folder com_virtuemart_cats with cached cats

why are u so stubborn? I suggested a fix.. did u try it?
otherwise Jenks suggested a plugin that puts a button at the top of your admin page where u can dump the cache.. have u tried it?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation