Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ v4.98 breaks plugins that use the date added on mapper database
v4.98 breaks plugins that use the date added on mapper database
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Dakine
(22 posts) Bio
|
Date
| Mon 11 May 2015 08:00 PM (UTC) Amended on Mon 11 May 2015 09:36 PM (UTC) by Dakine
|
Message
| I've updated to the latest version 4.98.
There was a notification that the GMCP mapper database required an update. This ran successfully. The messages showed that the date added column was removed.
This has broken a well used plugin that uses the date added for querying the database.
"SELECT r.uid, r.name as room, a.name as area, a.uid as areaid " ..
"FROM rooms r " ..
"INNER JOIN areas a ON a.uid = r.area " ..
"WHERE a.uid like %s " ..
"OR a.name like %s " ..
"ORDER BY r.date_added ASC, r.name "
The plugin just seems to use it to order the select query.
I'm not that familiar with SQL or the columns in the table.
Does anyone have a suggestion of what it can be replaced with? Or perhaps just needs removing?
Edit: In the interim removing the r.date_added ASC fixes the plugin. Will wait to see if there is a better suggestion.
Dak | Top |
|
Posted by
| Fiendish
USA (2,535 posts) Bio
Global Moderator |
Date
| Reply #1 on Mon 11 May 2015 08:59 PM (UTC) Amended on Mon 11 May 2015 09:01 PM (UTC) by Fiendish
|
Message
|
Quote: I've updated to the latest version 4.98.
There was a notification that the GMCP mapper database required an update.
That's an Aardwolf MUSHclient Package message that has nothing to do with MUSHclient itself.
Quote: This has broken a well used plugin that
You don't say what plugin. Anyway, this isn't really the place to ask. Maybe on Aardwolf?
My short response without knowing what the plugin is or why it's using that column is that sorting anything in the mapper by date_added is dumb. Don't do it. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Dakine
(22 posts) Bio
|
Date
| Reply #2 on Mon 11 May 2015 09:45 PM (UTC) Amended on Mon 11 May 2015 09:53 PM (UTC) by Dakine
|
Message
| You're right Fiendish.
I didn't mention the plugin as you rightly pointed out it's aardwolf related and not mushclient.
However, as there is quite a close relationship between the two that perhaps someone could suggest a fix in regard to knowing what the date_column was used for, not specifically the plugin itself.
If the administrator could delete the post that would be appreciated.
Dak | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #3 on Mon 11 May 2015 11:21 PM (UTC) |
Message
| I think we'll leave the post here in case someone else has that problem. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Fiendish
USA (2,535 posts) Bio
Global Moderator |
Date
| Reply #4 on Tue 12 May 2015 12:07 AM (UTC) |
Message
| Well if someone else has the problem and wants help they'll need to show what the plugin is. :) |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #5 on Tue 12 May 2015 02:47 AM (UTC) |
Message
| What plugin is it, then?
Quote:
v4.98 breaks plugins ...
Yes the original post was strangely non-specific. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #6 on Tue 12 May 2015 03:27 AM (UTC) |
Message
|
"ORDER BY r.date_added ASC, r.name "
You could always change that to:
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Fiendish
USA (2,535 posts) Bio
Global Moderator |
Date
| Reply #7 on Tue 12 May 2015 02:08 PM (UTC) Amended on Tue 12 May 2015 02:17 PM (UTC) by Fiendish
|
Message
| That will of course change the ordering. And without knowing what the plugin does or why it wants that order from the datastore of a different plugin, it's a good bet that the outcome will be undesirable.
To clarify the circumstances...
I made a change to my Aardwolf mapper database schema, and another plugin stopped working because I removed the column "date_added" which has no practical value and could have its data changed at any time for any reason.
Now the only thing that could possibly cause this is if this other plugin is manipulating the date_added field to store some tertiary information, because sorting specifically by date_added doesn't make sense otherwise since date_added was entirely arbitrary on my end.
IMO, the only sane thing for this other plugin to do is use its own information storage instead of trying to manipulate the room database that the mapper uses. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Dakine
(22 posts) Bio
|
Date
| Reply #8 on Tue 12 May 2015 07:23 PM (UTC) |
Message
| The plugin in question is part of WinkleWinkles plugin bundle. The actual plugin is the mapper extender.
WinkleWinkle_Mapper_Extender_4_1
https://code.google.com/p/aardwolf-scriptalicious/
It's at least 5 years on so is in need for some updates.
I would be happy to update it if I managed to grasp what it was doing. As far as I can tell with my limited experience it uses it to determine what's the first room in an area by the first room you visit when you discover that area. It used the date column to determine this.
Dak | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #9 on Tue 12 May 2015 07:56 PM (UTC) |
Message
| There's probably more than one "first room" in an area in any case. After that the date added would surely just be the order in which you explored the area?
Plus even that would be thrown out if you got teleported into the middle of the area for some reason.
As I recall, the existing mapper detects the transition from area A to area B, so that is a more reliable way of knowing what the "first room" in the area is. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Fiendish
USA (2,535 posts) Bio
Global Moderator |
Date
| Reply #10 on Tue 12 May 2015 08:15 PM (UTC) Amended on Tue 12 May 2015 08:22 PM (UTC) by Fiendish
|
Message
|
Quote: There's probably more than one "first room" in an area in any case.
Correct. And I explicitly said no to many requests to include shortest-path-into-area in the Aardwolf mapper after implementing it and deciding against it on merits.
This seems to be a plugin that sets a marker associating a particular room with an area keyword.
From what I can tell from a quick peek at the code for the mentioned plugin (I had to dig around and look inside a zip archive), at some point it changes date_added of a manually identified room to be essentially "earlier than everything else" and then later sorts all rooms in an area by date to find that room again.
This is just an obviously terrible idea because date_added can change again from under you. If you already have the room ID, and your goal is to go to that room ID, then just store the ID. Why muck about abusing data that means something else only to do a series of more expensive select queries to get back the information you already had to begin with? |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Dakine
(22 posts) Bio
|
Date
| Reply #11 on Wed 13 May 2015 01:50 AM (UTC) |
Message
| FYI,
Nokfah has very kindly put in a fix for the plugin.
https://github.com/Nokfah/MUSHScripts
Dak | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
26,765 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top