Markers sort not working properly

Phoca Maps - displaying maps in Joomla! CMS
bafrazier
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 01 Sep 2011, 19:13

Markers sort not working properly

Post by bafrazier »

I am upgrading a website from Joomla 2.5.28 to Joomla 3.4 and rather than deal with issues from one version to another, I have started from scratch with a new J3.4 install and recreating the pages and extensions again. One of the extensions is Phoca Maps. We love Phoca Maps on the live site and will love it on the new site once we figure out how to sort the markers so they show up on the Get Route dropdown list sorted by Title. We tried clicking on Title which sorts nicely on the back-end but does not make a difference on the front-end. Then we tried manually sorting them by clicking on the sort button so we could move the markers up and down. Joomla 3.4 activates for the sort, but once I grab the item and try to move it, I get the crossbar icon when hovering over the item but it refuses to move. It is totally weird. The page goes blank instead until I release the click. The page automatically fills in again. I've tested this in other extensions and it appears to work fine. It's just in Phoca Maps that this is a problem. Am I missing something? My client will not let the test site go live until this is fixed.

Here's the thing - sorting by Title looks good, but when I click on the Sort icon to manually move markers, it displays the list just like it looks in the Get Route dropdown list. it is incorrect. It's like the Title sort is superficial, it's not really what it looks like.

I've cleared the cache and browser cache thinking that this would help. I'm out of ideas and need help in getting this last thing to work properly.

Help....

Betsy
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Markers sort not working properly

Post by Jan »

Hi, can you paste a screeshot (screenshots) of the admin ordering? (e.g. per imgur.com - external service)

Anyway, try to do these 2 changes

1) edit this file:
administrator\components\com_phocamaps\views\phocamapsmarkers\tmpl\default.php line 86 cca
FROM:

Code: Select all

echo '<tr class="row'.$iD.'" sortable-group-id="'.$item->catid.'" item-id="'.$item->id.'" parents="'.$item->catid.'" level="0">'. "\n";
TO:

Code: Select all

//echo '<tr class="row'.$iD.'" sortable-group-id="'.$item->catid.'" item-id="'.$item->id.'" parents="'.$item->catid.'" level="0">'. "\n";
echo '<tr class="row'.$iD.'" sortable-group-id="'.$item->catid.'" >'. "\n";

2) edit this file:
administrator\components\com_phocamaps\controllers\phocamapsmarkers.php line cca 19
FROM:

Code: Select all

public function &getModel($name = 'PhocaMapsMarker', $prefix = 'PhocaMapsCpModel')
TO:

Code: Select all

public function &getModel($name = 'PhocaMapsMarker', $prefix = 'PhocaMapsCpModel', $config = array())

Please let me know, if this helped :idea:

Jan
If you find Phoca extensions useful, please support the project
bafrazier
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 01 Sep 2011, 19:13

Re: Markers sort not working properly

Post by bafrazier »

Jan,

Fantastic! Those two coding changes made all the difference. thank you, thank you...

Note: the first coding change I found it at line 171, not 86.

Will there be a Phoca Maps update to reflect these changes? If not, I will document for my client's website.

Betsy
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Markers sort not working properly

Post by Jan »

Hi, thank you for the info, yes, I will add both changes to newest version.

Jan
If you find Phoca extensions useful, please support the project
joggele
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 13 Apr 2015, 15:01

Re: Markers sort not working properly

Post by joggele »

Hello,

I have the same problem. I changed both files. I restarted MySQL-Server and Apache and I clean the cache. But nothing is done. The ordering is the same.

I use joomla 3.x and the newest version from phocamaps.


regards
Juergen
joggele
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 13 Apr 2015, 15:01

Re: Markers sort not working properly

Post by joggele »

Hello,

here I have a hardcopy what I mean: http://i.imgur.com/2RzIRf4.jpg

regards
Juergen
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Markers sort not working properly

Post by Jan »

Hi, are you not able to order the markers in administration?


Anyway see:
viewtopic.php?f=38&t=26398 (but the ordering was added as default, so now it works like described in this post)

Jan
If you find Phoca extensions useful, please support the project
joggele
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 13 Apr 2015, 15:01

Re: Markers sort not working properly

Post by joggele »

Hi Jan,

I can sort in the administration. That's okay. But if I sort to "title" in the administration, it's not sort in the frontend (see screenshot). I want the sort also on the map for the users.


regards
Juergen
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Markers sort not working properly

Post by Jan »

Hi, sorting in administration does not have any dependency to ordering in frontend.

If you sort in administration, this is only sorting for administration, so find the items better way. But to have it ordered in frontend, you need to change the ordering.

Jan
If you find Phoca extensions useful, please support the project
joggele
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 13 Apr 2015, 15:01

Re: Markers sort not working properly

Post by joggele »

Hello Jan,
But to have it ordered in frontend, you need to change the ordering.
That's my problem! How can I do it?

regards
Juergen
Post Reply