Page 1 of 2

Markers sort not working properly

Posted: 21 Mar 2015, 01:27
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

Re: Markers sort not working properly

Posted: 21 Mar 2015, 22:34
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

Re: Markers sort not working properly

Posted: 23 Mar 2015, 18:44
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

Re: Markers sort not working properly

Posted: 26 Mar 2015, 21:36
by Jan
Hi, thank you for the info, yes, I will add both changes to newest version.

Jan

Re: Markers sort not working properly

Posted: 13 Apr 2015, 15:10
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

Re: Markers sort not working properly

Posted: 14 Apr 2015, 15:55
by joggele
Hello,

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

regards
Juergen

Re: Markers sort not working properly

Posted: 16 Apr 2015, 00:13
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

Re: Markers sort not working properly

Posted: 16 Apr 2015, 09:25
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

Re: Markers sort not working properly

Posted: 18 Apr 2015, 22:51
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

Re: Markers sort not working properly

Posted: 20 Apr 2015, 09:04
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