VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: blackrat999 on January 17, 2018, 10:29:56 AM

Title: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 17, 2018, 10:29:56 AM
As the title says really.
I am running JM 3.8.3 with VM 3.2.12 (i have just updated from 3.2.4 because i found this issue there too in the hope the update might fix it)
Not sure when this occurred as only just noticed today.

If i click NEW on categories nothing happens and i cant publish or unpublish categories, no error message at all, Products are working as usual.

the site is https://www.ukgd.co.uk

thanks for any suggestions.
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: jenkinhill on January 17, 2018, 11:01:41 AM
Have you checked with VM debug?

Does the new category appear at all? It's not clear from your description.
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 17, 2018, 11:28:45 AM
Thanks for fast reply.
When i click NEW for Category nothing happens at all, it as if the button doesnt work.

with VM debugging on for Admin i get the following

Message
1 vmdebug 1 Language, default shoplanguage (VmConfig::$jDefLang): en_gb en-GB
2 vmdebug vmTime: time to load config: 0.00252008438110352
3 vmdebug Start used Ram 13M
5 vmdebug 1 Language, default shoplanguage (VmConfig::$jDefLang): en_gb en-GB
6 vmdebug vmTime: time to load config: 0.00114083290100098
7 vmdebug vmTime: "VirtueMartControllerConfig" Finished task config: 0.0149660110473633
8 vmdebug End used Ram 14.75M
9 vmdebug Peak memory peak 14.75M
Configuration Saved
2 vmdebug vmTime: time to load config: 0.00158095359802246
4 vmdebug getVendorId manager
5 vmdebug Active Mainvendor
6 vmdebug Set 935 to 1
7 vmdebug My Memory Limit in Bytes 134217728
8 vmdebug vmTime: "VirtueMartControllerConfig" Finished task config: 0.0402538776397705
9 vmdebug End used Ram 18.25M
10 vmdebug Peak memory peak 18.25M
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 18, 2018, 18:39:24 PM
Does this mean anything to anyone please?
thanks
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: jenkinhill on January 18, 2018, 18:45:16 PM
I have been checking and nobody else has reported this issue. Assuming that the debug text is from you selecting the New category button then I'd expect to see mention of VirtueMartControllerCategory

Is nothing active on the category list page? You should be able to unpublish a category from there.
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 18, 2018, 18:59:57 PM
i tried it again and did get that in the message

Message
1 vmdebug 1 Language, default shoplanguage (VmConfig::$jDefLang): en_gb en-GB
2 vmdebug vmTime: time to load config: 0.00242996215820312
3 vmdebug Start used Ram 13M
4 vmdebug Active Mainvendor
5 vmdebug Set 935 to 1
6 vmdebug vmTime: "VirtueMartControllerCategory" Finished task category: 0.0738589763641357
7 vmdebug End used Ram 16.5M
8 vmdebug Peak memory peak 16.5M
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 18, 2018, 19:03:38 PM
Just to confirm, i cant publish or unpublish or create new categories at all, not by clicking the green arrows or by selecting the category and then clicking the unpublish/publish buttons, none of them work at all.
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: Jörgen on January 18, 2018, 20:01:59 PM
Do You use any custom back end template ? Or perhaps some advanced plugin for the back end ?

regards

Jörgen @ Kreativ Fotografi
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 18, 2018, 20:51:09 PM
I do have the Advanced VM Inventory installed but the issue is the same when it is disabled and i have that also on plenty of other sites without issue.
It is the Yoo_Peak template designed to work with Vmuikit, again i have several sites like this.
I cant think of anything else that is different to other sites or could be causing the issue
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: Jörgen on January 18, 2018, 23:20:48 PM
try the isis template,

Jörgen @ Kreativ Fotografi
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 18, 2018, 23:57:05 PM
The ISIS template isnt showing as being installed but it is in the admin/templates folder ?
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: Jörgen on January 19, 2018, 06:58:28 AM
It is a template for the back end, it should be visible. I can see two templates for the back end, Hathor and Isis.

Was this a new (VM 3.2.4) or moved site ? Is there maybe a problem with an incomplete Joomla install ?

regards

Jörgen @ Kreativ Fotografi
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 19, 2018, 08:36:44 AM
Thanks for your time here Jorgen.
It was a migrated site from a 2.5 install a couple of months ago i am not 100% sure if this issue was happening when it was first migrated to be honest as nothing much was changed then.
It is as though there is a permissions issue with the categories only, i have had similar issues with Joomla articles not saving etc and that has always been the config file, is there a similar config for VM ?
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: Jörgen on January 19, 2018, 09:52:58 AM
I would ftp over all files for Joomla and VM once again.

Have You checked that there isn´t anything in the install that didn´t go through?

regards

Jörgen @ Kreativ Fotografi
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 19, 2018, 10:01:16 AM
ok is it best to do this from a working site files or brand new file download?
Just copy and replace via FTP?
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: Jörgen on January 19, 2018, 10:29:24 AM
First backup.

It could work from a working site, hopefully this would be a copy of a install file. But You will of course risk to copy files that aren´t of interest.
I would go for a new file download. VM would I install with the Joomla installer. The Joomla files are probably better to FTP.

Please do only install, do not uninstall VM.

Also do an update tables in configuration.

regards

Jörgen
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 19, 2018, 12:26:22 PM
Update:
I have cloned the site and on this one i have

reinstalled VM 3.2.12 with AIO - this didnt have any effect on the categories
Copied entire Joomla 3.8.3 via FTP over the original files - again no effect on categories still not able to adjust them at all.

any other suggestions?
thanks
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: Jörgen on January 19, 2018, 13:09:37 PM
Starting to run out of ideas.

What temlate do you use in backend ?
What php version ?
Do You have any Joomla legacy plugin still activated ?

regards

Jörgen @ Kreativ Fotografi
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 19, 2018, 13:33:38 PM
I am using the ISIS backend template i have Hathor listed but not sure how to enable?
PHP have tries 5.6 and 7.0 - no change
I have looked through plugins and unable to find anything unusual, nothing different to any other site.
so grateful for your help mate please dont give up on me !!
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: Jörgen on January 19, 2018, 13:45:29 PM
Have You used

"Install tables and if neccesary update"

under Tools ?

Is there perhaps some ACL issue ?
Rights for files and directories ?

regards

Jörgen @ Kreativ Fotografi
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 19, 2018, 14:45:26 PM
I have tried that yes, also installed ACL manager nothing obvious coming up.
I am sure it has been like this since the 2.5 migration, i cant even delete a category.
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: jenkinhill on January 19, 2018, 15:21:04 PM
Do you have other VM sites on the same server?  Have you looked for JavaScript errors using the browser console?
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 19, 2018, 15:34:46 PM
yes i have lots of other VM sites working fine, this one was started from a cloned copy other one that was/is working fine, i then migrated the content from Joomla 2.5 and since then the category issue has been happening.

I can see any errors though?

http://ukgd.temp-gingerweb.com
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: jenkinhill on January 19, 2018, 15:50:26 PM
I mean js errors in the backend on the category list page.
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: jenkinhill on January 19, 2018, 15:51:23 PM
You could also try creating another superadmin as vendor to see if that works.
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 19, 2018, 16:03:15 PM
Quote from: jenkinhill on January 19, 2018, 15:50:26 PM
I mean js errors in the backend on the category list page.


Ah yes :
Uncaught TypeError: Cannot read property 'VERSION' of undefined
    at bootstrap-tooltip-extended.min.js:6
    at bootstrap-tooltip-extended.min.js:6
vmkeepalive.js?vmver=fd964044:7 keepAlive each 14.19 minutes and maxlps 5
2core.js:1 Uncaught TypeError: Cannot set property 'value' of undefined
    at Object.e.submitform (core.js:1)
    at Object.e.submitbutton (core.js:1)
    at HTMLButtonElement.onclick (index.php?option=com_virtuemart&view=category:504)
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 19, 2018, 16:06:02 PM
this is the error that comes up when i click NEW in category

index.php?option=com_virtuemart&view=category:504 Uncaught TypeError: Cannot set property 'value' of undefined
    at Object.e.submitform (core.js:1)
    at Object.e.submitbutton (core.js:1)
    at HTMLButtonElement.onclick (index.php?option=com_virtuemart&view=category:504)
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 19, 2018, 16:32:48 PM
Quote from: jenkinhill on January 19, 2018, 15:51:23 PM
You could also try creating another superadmin as vendor to see if that works.

No change trying this, thanks.
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: jenkinhill on January 19, 2018, 17:12:20 PM
OK, not sure if this is it as you have other sites working OK, but see this .htaccess fix    http://forum.virtuemart.net/index.php?topic=137040.msg484373#msg484373
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 19, 2018, 18:21:12 PM
Nope i had high hopes for that one but no difference.

the console error message in FF when i click the NEW button is

TypeError: o.task is undefined
[Learn More]
core.js:1:207
Empty string passed to getElementById().
jquery.min.js:2:24932

Do these error messages mean anything to you ?
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 20, 2018, 09:29:00 AM
Update i have tried a couple of other Admin templates, both do the same as ISIS.
Still I cant create new Categories in VM.
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: Jörgen on January 20, 2018, 12:14:20 PM
What are your css and java settings  in configuration?

Jörgen @ Kreativ Fotografi
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 20, 2018, 17:43:58 PM
As below, i am using Vmuikit on this installation (and others like it) again I have updated it to the latest version (the issue was present before i upgraded it)
thanks
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: Jörgen on January 20, 2018, 20:24:51 PM
Shot in the dark, if You untick extern Google Jquery?

There is some kind of Jquery conflict on Your site.

Jörgen @ Kreativ Fotografi
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 20, 2018, 21:23:20 PM
thanks i tried that and installed jquery easy and tried a few different settings but still no change
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: Studio 42 on January 21, 2018, 03:25:36 AM
Disable "use external google jquery library"
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 21, 2018, 08:23:28 AM
thanks i tried that and installed jquery easy and tried a few different settings but still no change
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 21, 2018, 10:30:22 AM
I really appreciate any help guys, looks like it isnt easily fixable and i need it sorted so i have made a start at rebuilding the site and migrating the content across, i should be able to get it done in a day and will test the categories at every step!
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 21, 2018, 10:55:32 AM
I have just migrated the old data to the newly built site this morning and immediately after doing this i am unable to do anything with the categories again. everything was fine until after the migration. I will get onto Daycounts.com again to see if they have any ideas what is causing this, i can see they have logged in but they havent got back to me re the issue, i will report back.
again thanks everyone for help so far.
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 21, 2018, 11:23:21 AM
Ok update!
The issue relates to the content of DB table

xxxxx_virtuemart_category_categories

If i remove all the rows then i can create new categories again. Obviously i dont want to do that so im trying to figure out which rows are actually in use.

I have 13 categories on the site but there are 52 rows.
In Admin the only clue to each row is the ID at the end but at the moment i cant figure out a correlation between this ID and the column heading in the DB as the one titled ID doesnt seem to relate to the admin.

can anyone advise please ?

Title: Re: Unable to create new categories or publish/unpublish them?
Post by: jjk on January 21, 2018, 11:29:55 AM
Did you ever try to click 'Tools' > 'Tools & Migration' > 'Install or if necessary update tables' in the VM administration?
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 21, 2018, 11:42:59 AM
yes tried that a few times, it doesnt make any difference to the tables in my database im afraid :-(
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: jjk on January 21, 2018, 11:48:54 AM
Quote from: blackrat999 on January 21, 2018, 11:23:21 AM
xxxxx_virtuemart_category_categories
I have 13 categories on the site but there are 52 rows.
Looks to me like you have a number of subcategories. Perhaps compare the category ids with those in the table xxxxx_virtuemart_categories_en_gb. There you  can see the category names assigned to the category id numbers.

In addition to that, you could open and 'Save' each category in use once. That should give you a new 'modified' date in the db table, so you can see which ones are active.
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 21, 2018, 12:07:47 PM
thanks for the tips.
the issue is definitely in the table xxxxx_virtuemart_category_categories
on a test site i removed 5 rows and all of a sudden everything worked again. Now replicating the original fully so i can test on that database before adjusting the live site. Confident i can fix it now just need to take it slow and backup a lot!
thanks for help.
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: blackrat999 on January 21, 2018, 13:20:07 PM
Cracked it!!

There was a category listed in Admin which didnt have any description/products etc and wasnt showing an ID or published button etc, once i found it in xxxx_virtuemart_categories_en_gb and removed the row all my subcategories came back and i can now edit the categories again!

Thanks for each of you that tried to help i am really grateful to you all.
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: jenkinhill on January 21, 2018, 14:02:16 PM
Good to know it is solved.
Title: Re: Unable to create new categories or publish/unpublish them?
Post by: Jörgen on January 21, 2018, 15:21:11 PM
Great to hear it´s solved. There wasn´t much more than database or configuration left to look for :)

Jörgen @ Kreativ Fotografi