deleted files show in discover Topic is solved

Need help with the Administration of your Joomla! 4.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
what2use
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 150
Joined: Fri May 22, 2015 7:16 pm

deleted files show in discover

Post by what2use » Sat Oct 01, 2022 7:57 pm

In extensions/discover one item still shows and I can't figure out where it is coming from.

It shows an old template that I deleted a long time ago. The template does not show in extensions or site modules

Screen capture attached
You do not have the required permissions to view the files attached to this post.

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13080
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: deleted files show in discover

Post by sozzled » Sat Oct 01, 2022 8:11 pm

It could be a "dead" reference in the _extensions table. One way to find out is to run the following SQL query

Code: Select all

SELECT * FROM xxxxx_extensions WHERE type = "template"; 
substituting the random/unique table prefix for your website instead of xxxxx. Post the result of that SQL query here.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

what2use
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 150
Joined: Fri May 22, 2015 7:16 pm

Re: deleted files show in discover

Post by what2use » Sat Oct 01, 2022 8:25 pm

SQL query result as attachment
You do not have the required permissions to view the files attached to this post.

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13080
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: deleted files show in discover

Post by sozzled » Sat Oct 01, 2022 8:50 pm

Thank you. We have to eliminate possible "dead entries" in the _extensions table. The Discover tool looks at the _extensions table, looks at the rows, and "marries" the records with the file system.

Therefore, theoretically, there's a row in the _extensions table with a reference to "Books1" (but it's not a template). What you could do with phpMyAdmin is to display all the rows (well, the first 500, at least) in the _extensions table and filter with "Books1", like I've shown in the attached screenshot
You do not have the required permissions to view the files attached to this post.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

what2use
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 150
Joined: Fri May 22, 2015 7:16 pm

Re: deleted files show in discover

Post by what2use » Sat Oct 01, 2022 9:09 pm

The results of the filter are attached
show-book.png
You do not have the required permissions to view the files attached to this post.

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13080
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: deleted files show in discover

Post by sozzled » Sat Oct 01, 2022 9:29 pm

Books2 is a "good" template (i.e. the template is installed) although, if the template is modelled on Protostar—a J! 3.x template—it won't work with J! 4.x and it might as well be uninstalled.

The next place to look is the filesystem; the folder structure for the site templates. Refer to the attached screenshot (taken from Filezilla):
You do not have the required permissions to view the files attached to this post.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 42118
Joined: Sat Apr 05, 2008 9:58 pm

Re: deleted files show in discover

Post by Webdongle » Sat Oct 01, 2022 9:33 pm

what2use wrote:
Sat Oct 01, 2022 7:57 pm
...
It shows an old template that I deleted a long time ago. ...
Deleted or uninstalled? If the former then of course it left traces behind.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

what2use
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 150
Joined: Fri May 22, 2015 7:16 pm

Re: deleted files show in discover

Post by what2use » Sat Oct 01, 2022 9:56 pm

The template was uninstalled. There is no folder for it. The only template folders are the ones from your list
Cassiopeia and system.

It is not a current template it is something left over from joomla 3.
It shows in the template list
installed-templates.jpg
If I click on that template I get this error
template-error.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13080
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: deleted files show in discover

Post by sozzled » Sat Oct 01, 2022 10:12 pm

what2use wrote:
Sat Oct 01, 2022 9:56 pm
The template was uninstalled. There is no folder for it. The only template folders are the ones from your list
Cassiopeia and system.
Thanks. I had to ask the obvious questions. :)

Thanks also for the screenshots you posted. What disturbs me is the error message: "ksort(): Argument #1 ($array) must be of type array, bool given"

I haven't seen that error message before. I searched for it on Google but did not retrieve any results. ksort() is a PHP function. Highly improbable (but possible) there's an issue with the PHP setup on the server?

As I mentioned in my previous post, Books2 is probably similar to Protostar and therefore unusable in J! 4.x (and that may be why you get the error message in the second screenshot you posted) but this doesn't explain why there's a trace of Books1, evidenced from the opening post in this topic. Uninstalling Books2 may be a workaround with Extensions » Manage, assuming Books2 is not the "default" template you're using on your website.

I'm unfazed about how this happened as far as Books1 is concerned; Joomla, for all its goodness, is imperfect and these things happen; I've been patching broken databases caused by imperfect "uninstalls" since I can't remember when. At this stage, however, I would suggest using the Forum Post Assistant and we'll try to deduce from that what we can. Does that seem to be a worthwhile suggestion?
Last edited by sozzled on Sat Oct 01, 2022 10:28 pm, edited 2 times in total.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

what2use
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 150
Joined: Fri May 22, 2015 7:16 pm

Re: deleted files show in discover

Post by what2use » Sat Oct 01, 2022 10:14 pm

I did another search of the database and it appears that there are leftovers from two joomla 3 templates that were uninstalled. The templates are Books1 and BooksABC

I found the following related entries in the database

table extensions
Name: Books2
Type: template


table template_overrides
BooksABC L2h0bWwvY29tX2NvbnRhY3QvY29udGFjdC9kZWZhdWx0X2FkZHJlc3MucGhw
Books1 L2h0bWwvY29tX2NvbnRhY3QvY29udGFjdC9kZWZhdWx0X2FkZHJlc3MucGhw
Books1 L2h0bWwvY29tX2NvbnRhY3QvY29udGFjdC9kZWZhdWx0X2Zvcm0ucGhw
BooksABC L2h0bWwvY29tX2NvbnRhY3QvY29udGFjdC9kZWZhdWx0X2Zvcm0ucGhw

table template_styles

Books1
BooksABC

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13080
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: deleted files show in discover

Post by sozzled » Sat Oct 01, 2022 10:18 pm

Excellent! Also shows I must be blind to have overlooked those other two tables _template_overrides and _template_styles! :-[

If this were my website, I would delete those records—leave the record in the _extensions table alone—and then run the Discover tool again and see if that fixed the problem.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 42118
Joined: Sat Apr 05, 2008 9:58 pm

Re: deleted files show in discover

Post by Webdongle » Sat Oct 01, 2022 11:02 pm

Make a backup then delete the tables.
Would deletetung from Extensions >>> Manage remove the entries?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13080
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: deleted files show in discover

Post by sozzled » Sat Oct 01, 2022 11:10 pm

Webdongle wrote:
Sat Oct 01, 2022 11:02 pm
Would deletetung (sic) from Extensions >>> Manage remove the entries?
"Delete" what, specifically? What "entries" are you referring to? I don't understand your question, or whether it's relevant. I think we've discovered the ghost in the machine and, at this point, let's just deal with the junk left over in the _templates_overrides and _templates_styles tables first. Then we can examine the errors resulting from the Books2 "thing". If we start hammering this topic with too many suggestions (and win a few inconsequential skirmishes) we may lose the objective of the main battle.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

what2use
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 150
Joined: Fri May 22, 2015 7:16 pm

Re: deleted files show in discover

Post by what2use » Sun Oct 02, 2022 1:27 pm

I appreciate and welcome all the input. I will try what you suggested and
"delete those records—leave the record in the _extensions table alone—and then run the Discover tool again and see if that fixed the problem."

what2use
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 150
Joined: Fri May 22, 2015 7:16 pm

Re: deleted files show in discover

Post by what2use » Sun Oct 02, 2022 1:45 pm

sozzled wrote:
Sat Oct 01, 2022 10:18 pm
Excellent! Also shows I must be blind to have overlooked those other two tables _template_overrides and _template_styles! :-[

If this were my website, I would delete those records—leave the record in the _extensions table alone—and then run the Discover tool again and see if that fixed the problem.
That did it. The discover is now clear. Thanks for the help


Post Reply

Return to “Administration Joomla! 4.x”