Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing Menu Links #47

Closed
wkwolff opened this issue Apr 20, 2012 · 11 comments
Closed

Editing Menu Links #47

wkwolff opened this issue Apr 20, 2012 · 11 comments

Comments

@wkwolff
Copy link

wkwolff commented Apr 20, 2012

When editing order of menu links and trying to save I got error.

/admin/menu/manage/links/main-menu

This file can't be found.

@quickapps
Copy link
Owner

Are you getting a 404 response after form submitted ?

The ordering save process (when you click "Save changes") is performed using Ajax. If you are getting a page refresh after click the save button then is caused by some JS/broser problem. In that case I'll need to know which browser are you using in order to try to reproduce this issue.

@wkwolff
Copy link
Author

wkwolff commented Apr 20, 2012

Yes, I was getting a 404 error in Chrome and Firefox on a Mac.

@quickapps
Copy link
Owner

I've just tested both browsers on Windows and all seems to work okay.
Could you try to determinate which is the JS error using FF's console ? because I have not a Mac OS right now to reproduce your environment.

@wkwolff
Copy link
Author

wkwolff commented Apr 20, 2012

I won't be able to get to my environment until after the weekend. I will definitely take a look and respond asap though.

@wkwolff
Copy link
Author

wkwolff commented Apr 23, 2012

Here is the error from FF:

"NetworkError: 404 Not Found - http://localhost/quickapps/quickapps/admin/menu/manage/links/main-menu"

Here is the error from Chrome console:

. POST http://localhost/quickapps/quickapps/admin/menu/manage/links/main-menu 404 (Not Found)
. f.support.ajax.f.ajaxTransport.sendjquery.js:4

. f.extend.ajaxjquery.js:4

. (anonymous function)main-menu:101
. f.event.dispatchjquery.js:3

. f.event.add.h.handle.i

@quickapps
Copy link
Owner

I think your QuickApps installation up to date ?
A similar issue was fixed here:
d8d05ec

Update your QuickApps folder to the latest available according to your branch.

@wkwolff
Copy link
Author

wkwolff commented Apr 23, 2012

Yes, my QuickApps installation is the most current 1.0. I just downloaded Friday.

I just want to say that I really like what you have done with QuickApps. Thanks.

@quickapps
Copy link
Owner

Thanks!,

Well the error message is really clear, the url "http://localhost/quickapps/quickapps/admin/menu/manage/links/main-menu" does not exists.

I assume that your QACMS installation is on your "quickapps" directory right? [1]
So the problem is the duplicated word in the url: /quickapps/quickapps/


Check the generated HTML code in your browser, and find the QuickApps.settings.url JS variable:

  Query.extend(QuickApps.settings, {
      "url": "http://localhost/quickapps/quickapps",
  ...

if there is a double "quickapps" word means that somethings is wrong with the value of this JS variable (assuming [1]).
This JS variable is defined on QuickAppsComponent::prepareContent() line 191:

 (defined('FULL_BASE_URL') ? FULL_BASE_URL . $this->Controller->here : $this->Controller->here)

I believe that something in your enviroment is producing and incorrect value for this JS variable.

  • What is the value of $this->Controller->here ?
  • Is the constant FULL_BASE_URL defined ? its value ?
  • What value do you get from this: env('HTTP_HOST') ?

@wkwolff
Copy link
Author

wkwolff commented Apr 23, 2012

I opened up QuickAppsComponent.php.

Line 191 was this:
"url": "' . Router::url($this->Controller->here, true) . '",

Changed to:
"url": "' . (defined('FULL_BASE_URL') ? FULL_BASE_URL . $this->Controller->here : $this->Controller->here) . '",

Works now.

Thanks, sorry for any trouble.

@quickapps
Copy link
Owner

Great! :)

(I recommend you to update your QuickApps directory)

@wkwolff
Copy link
Author

wkwolff commented Apr 23, 2012

Will do and thanks for your help!

Really appreciate it.

@botchris botchris modified the milestone: 1.x Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants