Discussion Forums  >  Self Hosted Control Panels

Replies: 8    Views: 220

fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
02/02/14 10:33 AM (11 years ago)

Unable to change nickname even when there are no duplicates

I have to change some Custom URL screen nicknames in BT3.0 self-hosted, but on some screens (not all) I get this error: {"result":"error", "errors":"nickname already in use, no duplicates allowed"} But there are no duplicates, and in MySQL no entry with such nicknames are flagged as 'deleted'! Strange, isn't it? Any idea? Cheers Jack
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/02/14 05:29 PM (11 years ago)
I just change the nickname. It's happened to me. Still not sure why. I secretly think there is some kind of 'unforgiving' character somewhere that isn't being 'prepped' before MySQL. However I say that like a patient with no medical experience telling the doctor what he thinks is wrong… :\ If I find something, I'll let you know. If you find something, let me know. :) Cheers! -- Smug
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
02/03/14 12:08 AM (11 years ago)
Yes, I had this issue before too and I just changed the nickname and it was ok. But this time I have to modify the nicknames in a precise way as they are 'linked' to something else. I have two PHP used to generate on-the-fly dataURL files for Location Map screens. One is the 'Show driving directions' version (no problem, as it just uses lat long), but the other one is the 'Load the screen...' version, using names of folders in my website. So the screen names must be the same than the folders names... Let's hope that someone will read this thread and have an idea of a possible solution! Cheers Jack
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/03/14 02:30 AM (11 years ago)
You know, it would take a bit of mental juggling at first to layout the menu 'tree', but once you had it figured out all of that could be done with PHP. If you're going to have to use the network, you may as well let it do all of the heavy lifting for you. Is any/all of that connected to a database? It doesn't have to be, I'm just curious… Cheers! -- Smug
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
02/03/14 03:29 AM (11 years ago)
Yes, it's connected with a database! On my website, every 'entity' (town, museum, festival, anything) has its own folder, with an index.php pulling data from MySQL. All data (name of entity, name of folder, lat, long, phone, etc.) are actually in MySQL. And every entity has (in MySQL too) one or several keywords. Query to this or that keyword will produce a list, e.g. list of all towns and villages in this or that area. These lists may be anything: plain lists of entities, maps with locations, and so on. So I can also produce JSON for apps and it's quite useful for Location Map screens. It's just a PHP request with a keyword. In the case of JSON generated by PHP for Location Map plugin, I use the name of the website folder to load the app's screens. So the nickname of the app's screen must be exactly the same as the name of the website folder... Hence this annoying issue! Of course there's a workaround: I can save the result of the PHP request as a .txt file, edit it to match the names of screens in the app, upload it to my website and use it in the app, but ergonomically it's not a good solution. Cheers Jack
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
02/03/14 04:02 AM (11 years ago)
Make an entry in http://buzz-tools.com (If it's not already there)
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
02/03/14 04:09 AM (11 years ago)
Good suggestion, Niraj! I guess it's related to the BT3.0 core and not to the plugin, but who knows? I'll make an entry! Cheers Jack
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/03/14 04:10 AM (11 years ago)
You can always use php to get an array of directory names. once you have that, couldn't you dynamically create your screen names? http://www.php.net/manual/en/function.scandir.php Cheers! -- Smug
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
02/03/14 04:33 AM (11 years ago)
Unfortunately not! I would have all directory names, not the wished selection of directories...
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.