Is this a bug or a deliberate feature? Topic is solved

For Joomla! 3.x Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general

Moderator: ooffick

Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Post Reply
rogerco
Joomla! Intern
Joomla! Intern
Posts: 88
Joined: Tue Jan 23, 2007 8:56 pm

Is this a bug or a deliberate feature?

Post by rogerco » Tue Sep 11, 2018 3:12 pm

When the installer parses the install.mysql.utf8.sql file for a component it correctly replaces "#_" with the table prefix in some statements but not in others.

Specifically the statement

Code: Select all

SET @targettable = "#__tablename" ;
does not get corrected to

Code: Select all

SET @targettable = "tableprefix_tablename";
whereas

Code: Select all

ALTER #__helloworld ...
does become

Code: Select all

ALTER tableprefix_helloworld
if you try the SET statement without the quotes as works in the ALTER statement then it still doesn't get touched (and anyway would cause an error in SQL as the @tablename variable type would be wrong)

Why is this and should it be fixed?
Shouldn't the installer replace any instance or #_ with tableprefix?
Last edited by imanickam on Wed Sep 12, 2018 2:46 pm, edited 1 time in total.
Reason: Moved the topic from the forum Joomla! 3.x Bug Reporting to the forum Joomla! 3.x Coding

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

Re: Is this a bug or a deliberate feature?

Post by Webdongle » Tue Sep 11, 2018 6:43 pm

http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

rogerco
Joomla! Intern
Joomla! Intern
Posts: 88
Joined: Tue Jan 23, 2007 8:56 pm

Re: Is this a bug or a deliberate feature?

Post by rogerco » Tue Sep 11, 2018 8:39 pm

Oh dear. I seem to have three different logins for official joomla related sites (forum, JED, and code which appears to have moved to git) but none of them work on that site which seems to require a GitHub login that I don't have and no obvious way to create one if I could be bothered.

Really over the years Joomla has got a bit bloated and difficult to access some of the developer and support facilities. Its bad enough that the development forum seems to have migrated from here to a google mail list requiring a different login again, now it seems that there is no simple way to raise an issue unless you are a more or less full time developer on the system and have a GitHub login.

All I can do is hope that someone else will copy and paste the report above into the relevant place because life is to short to create a whole new account for one stupid little problem.

If its any consolation Wordpress which I also use about as much a Joomla now is no easier to interact with on technical issues.

Of course I totally appreciate the helpful and useful mutual support offered for free by people on here, no criticism of that at all. Its just that I hanker after a time when it was all so much simpler because there was so much less of it ! As an occasional amateur developer on joomla, not a full time professional, I do find that it has become a bit impenetrable and tangled over the years. If you are only doing one new small joomla dev project a year it has become quite a heavy learning curve getting your head around it for fresh every time.

Anyway thanks for the help, if anyone has read this far and has access to post in the git issue tracker perhaps you could do me a small favour and post the issue above there. I will have to find another way around the problem but it does seem like a minor flaw in the Joomla installer.

Cheers
RogerCO

User avatar
sozzled
Joomla! Champion
Joomla! Champion
Posts: 5836
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Is this a bug or a deliberate feature?

Post by sozzled » Tue Sep 11, 2018 10:11 pm

FWIW, this forum is not the place to actually report " bugs" even if the title of the forum category has the words "J! 3.x Bug Reporting". The purpose of this forum category is (apparently) to show people how to use the Bug Tracker. To quote from the category description:
Did you find a bug in Joomla! 3.x but aren't sure? This forum is the place to help figure out if the problem is a bug and how to report it. If you are an experienced Joomla! user and are certain that you have found a bug please use the Bug Tracker to submit your issue.
This forum is for discussion about bugs and to get help with reporting them to the Bug Tracker: https://issues.joomla.org
So there you have it.

@Webdongle simply pointed to the Bug Tracker portal—https://issues.joomla.org—which is entirely appropriate. If you don't want to spend time using the Bug Tracker that's your choice. If you're hoping that someone else will copy and paste this information into the Bug Tracker, that's a "wait and see". :)
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

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

Re: Is this a bug or a deliberate feature?

Post by Webdongle » Tue Sep 11, 2018 10:32 pm

Methinks part of the reason for this forum is to see if it is a bug. If yes then point to the tracker. If not then report the post as off topic so a mod can move it to a board relevant to the OP's problem. It keeps user problems in the forum and prevents the tracker getting 'clogged' with posts that are (in affect) support requests.

Also it helps volunteers to assess the problem and better present (in the tracker) steps to reproduce.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

rogerco
Joomla! Intern
Joomla! Intern
Posts: 88
Joined: Tue Jan 23, 2007 8:56 pm

Re: Is this a bug or a deliberate feature?

Post by rogerco » Wed Sep 12, 2018 11:50 am

Update - No of course it isn't a bug! As Hannes pointed out elsewhere in the case of

Code: Select all

UPDATE #__tablename SET content=“#__this is some content” WHERE id=1
the result needs to be:

Code: Select all

UPDATE prefix_tablename SET content="#__this is some content” WHERE id=1
not

Code: Select all

UPDATE prefix_tablename SET content=“prefix_this is some content” WHERE id=1
So in this (most) cases ignoring the #_ after a SET where it is in quotes would be correct. My case is probably a rather obscure one that arose because I started down the line of using MySQL to test if a column exists before altering a table in an install/update script.

I now realise that I will have to do this in php somehow and not in the SQL script itself. I can't see any simple way of allowing my original SQL code to work but also protecting the more common cases where "#__" might appear in the content of a column.

Thanks to everyone for their help in thinking this through. Case closed and back to the drawing board I think.

User avatar
sozzled
Joomla! Champion
Joomla! Champion
Posts: 5836
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Is this a bug or a deliberate feature?

Post by sozzled » Wed Sep 12, 2018 2:46 pm

So ... if this isn't a bug, then what is the purpose of the "Bug Reporting" forum category? As I've written on other occasions, this forum category is about as useful as not having an entire category devoted to using other facilities such as [How to use the] Forum Post Assistant.

I completely reject the need for a dedicated category to help people "decide" if something is a bug or not. There are four hundred other places where people can do that.

Of course I'm wasting my time arguing the point. I'm probably wasting my time asking for a new forum category to be created for help with using the FPA. I have also wasted my time asking for the closure of the "J! 2.5 - Coding" forum category to be closed (apparently people can still ask questions about contributing to the development of J! 1.6, would you believe?).

So, yeah, this wasn't a bug in the design of J! 3.x. Does this fact reassure followers [ redacted ] who feel that we need a forum to "discuss" and "decide" if something is a bug (when we already gave Github and hundreds of other places) or "helps volunteers in assessing the problem"? You be the judge if that.

Thanks, @rogerco, for letting us know that your problem wasn't a bug in J! 3.x. I was a little worried for a couple of minutes. :)
Last edited by toivo on Thu Sep 13, 2018 6:38 am, edited 1 time in total.
Reason: mod note: misleading reference removed
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

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

Re: Is this a bug or a deliberate feature?

Post by Webdongle » Wed Sep 12, 2018 9:20 pm

sozzled wrote:
Wed Sep 12, 2018 2:46 pm
So ... if this isn't a bug, then what is the purpose of the "Bug Reporting" forum category? ...
For users who think it might be a bug but are not sure. They post in here and the experienced volunteers advice if it is a bug or not.

It seems to work like
If
certain is a bug
Then
post in tracker
If
not sure
Then
post in here

If
posted in here
check if a bug
If
a bug
Then
post in tracker
If
not a bug
Then
a moderator moves it to appropriate board
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
sozzled
Joomla! Champion
Joomla! Champion
Posts: 5836
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Is this a bug or a deliberate feature?

Post by sozzled » Wed Sep 12, 2018 9:35 pm

The original question was posted in the "J! 3.x Bug Reporting" forum. Basically it was a question; a kind of "General Question / New to J! 3.x" topic: an I-don't-know question. The topic has been moved (whether by moderator initiative or upon request) to the "J! 3.x Coding" forum category. TBH, I don't know what is the purpose of these "J! x.y Coding" categories. Why do we have one for J! 2.5?
Webdongle wrote:
Wed Sep 12, 2018 9:20 pm
If
not a bug
Then
a moderator moves it to appropriate board
... which rarely happens, does it? Just look through the topics in J! 3.x Bug Reporting forum category and see for yourself: non-bugs remain there indefinitely. So, while the concept—as you've expressed it—might have merit, I don't believe that's how things play out in practice.

Anyway, the point I'm making (and making it badly) is that we probably should have a new forum category for "How to use the Bug Tracker" and another one for "How to use the Forum Post Assistant". What do you think?
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

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

Re: Is this a bug or a deliberate feature?

Post by Webdongle » Wed Sep 12, 2018 10:16 pm

sozzled wrote:
Wed Sep 12, 2018 9:35 pm
... which rarely happens, does it? Just look through the topics in J! 3.x Bug Reporting forum category and see for yourself ...
Many are abandoned by the OP who has not replied with information that would help decide if it was truly a bug. And there is no way of seeing how many posts have been moved ... so the posts remaining in that board are no proof.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

rogerco
Joomla! Intern
Joomla! Intern
Posts: 88
Joined: Tue Jan 23, 2007 8:56 pm

Re: Is this a bug or a deliberate feature?

Post by rogerco » Wed Sep 12, 2018 10:26 pm

hey guys,
I appreciate your somewhat philosophical debate but just look at the subject of my original post.
Is this a bug or a deliberate feature?
and then look at my last post
Update - No of course it isn't a bug! As Hannes pointed out elsewhere
...
Thanks to everyone for their help in thinking this through. Case closed and back to the drawing board I think.
Seems to me that apart from the slight misnaming of the forum - perhaps it should be "Possible bug screening" it is working pretty well.
I even clicked the little tick to mark the issue as solved, so ideally the moderator would make the topic read only so that it remains here in case anyone in the future looks for the same issue.
(yes I did search before posting)
The solution was actually worked out eventually on the development mail list in parallel, but it has been entertaining watch two big beasts of the Joomla Jungle lock horns :) ;) :eek:
Thanks again.

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

Re: Is this a bug or a deliberate feature?

Post by Webdongle » Wed Sep 12, 2018 11:23 pm

Which dev mailing list ?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

rogerco
Joomla! Intern
Joomla! Intern
Posts: 88
Joined: Tue Jan 23, 2007 8:56 pm

Re: Is this a bug or a deliberate feature?

Post by rogerco » Thu Sep 13, 2018 7:39 am

http://groups.google.com/group/joomla-dev-general

as per top of this forum where I first came looking for an answer. Didn't originally post here as the forum rules above say use the list instead. Now this topic has been moved here from Bug reporting(possible bugs) forum so the circle closes. Thus this forum has a use as a repository for possible bugs that turn out not to be.
Bug reporting forum could probably do with a clean out though.


Post Reply

Return to “Joomla! 3.x Coding”