thedigicraft / Atom.CMS

Atom.CMS
56 stars 52 forks source link

Navigation problem (part - 91) #235

Closed v917 closed 7 years ago

v917 commented 7 years ago

Hi, @creptor sorry for bothering you again. I am changing home and about-us positions and it's working:

image

but it is not working here:

image

I have even refreshed after changing their positions. And this time there are no typing errors as well.

v917 commented 7 years ago

list-sort.php: https://pastebin.com/ZC3ZHN7C

And even firebug console is not showing an error.

Actually I have noticed one thing that phpmyadmin is changing position value itself, don't know why. For instance, If I have given position values 1-3 then it automatically starts it from 0 and end at 2. I have searched on internet as well but didn't find anything. And position value remains the same no matter how many time you will change. It is ranging 0-2 always.

creptor commented 7 years ago

I'm sorry, I forgot I received an email with this issue. Were you able to fix it yourself?

v917 commented 7 years ago

no

v917 commented 7 years ago

Actually, I thought you (@creptor) are busy and I have already bothered you so much, so, I decided to leave. But didn't understand the problem yet.

And I also wanted know that what is the purpose of settings link in the admin because it's doing nothing in the main site. Could you please elaborate that also.

creptor commented 7 years ago

well the idea of making the navigation on the admin page is for the admin to be able to reorder or add new links to the navigation bar on the visible site...

to understand your problem I need the header.php from the visible site, and the navigation.php settings from the admin part.

v917 commented 7 years ago

I am asking the purpose of settings sir.

v917 commented 7 years ago

header.php https://pastebin.com/hHKCAHfD This header.php location is AtomCMS/admin/template/header.php Is this you are asking?

navigation.php https://pastebin.com/37g1RQpW

creptor commented 7 years ago

could you please be more specific? Which settings are you talking about?

v917 commented 7 years ago

image

Here see the settings link

v917 commented 7 years ago

And this navigation is working on the admin correctly but not on the main site. This is the actual problem.

creptor commented 7 years ago

Ok I got confused.... The order of the elements (the items on the left) are the one not working, or the items on the left are the ones not working

v917 commented 7 years ago

see the 1st comment of mine, then you will surely understand

v917 commented 7 years ago

see here its working :

image

And in Alan's video the order is changing on the below site as well, but mine is not working on the below site

image

Have you got my point now?

creptor commented 7 years ago

I think.... Can I see your ajax script?

v917 commented 7 years ago

list-sort.php: https://pastebin.com/ZC3ZHN7C

js.php https://pastebin.com/0GShraXe

creptor commented 7 years ago

mmmm..... if you refresh the page, the changes are there or the order of the list returns to default?

v917 commented 7 years ago

after refreshing i can see the changes

creptor commented 7 years ago

Does the database shows those changes??

creptor commented 7 years ago

please check

v917 commented 7 years ago

image

Here position value is showing the change but on admin id is showing the changes

v917 commented 7 years ago

So, it's confusing now😕

v917 commented 7 years ago

template.php: https://pastebin.com/izup0pRY

template.php is also correct. I am not understanding what's wrong.

creptor commented 7 years ago

maybe try changing the position ASC to DESC, on the header.php... see if something changes

v917 commented 7 years ago

are you talking about template.php? And If yes, then nothing happened

creptor commented 7 years ago

sorry, I'm talking about the navigation.php

v917 commented 7 years ago

OK

v917 commented 7 years ago

no change

creptor commented 7 years ago

I'll try to help you tomorrow, it's kind of late now (sorry 😢 ) cya 👋

v917 commented 7 years ago

It's ok, I know it's night in your city.😃 Actually in my city this is morning time..😁

creptor commented 7 years ago

can you change the ASC for DESC on the template.php file? to see if something changes...

v917 commented 7 years ago

I did that as well but nothing happened..😔

v917 commented 7 years ago

I saw that on the navigation link side after reordering the labels, the id value gets reorder accordingly, but position value doesn't, but in database change is displayed in position value. And on main visible site we are displaying label name with reference to the url of the page. We are not relating position to the main visible site.

Are you understanding what my point is?

v917 commented 7 years ago

See in the below screenshot, I have replaced the labels of main visible site with position value and guess what, it worked. But the problem is, because with the help of navigation link we have changed only the position value that is why here ( below screenshot ), it is changing the position value (coming from navigation table ) and the content below remains intact because that is coming from the pages table.

image

creptor commented 7 years ago

is the position an int or an varchar value? (please check the database for this, on structure)

v917 commented 7 years ago

it is int

creptor commented 7 years ago

I have no idea why this is not working properly, I'm sorry.

As a last effort you could change the engine used by the database to see if it fixes the problem, but I don't know why this is happening.

v917 commented 7 years ago

It's okay and thank you so much for your help.