I have been pulling my hair out over this one for days...
I made a module which creates a page.
The module works fine as far as I can tell until I go and clear the sites cache.
At this point the page becomes un-accessible.
I tried rebuilding the sites permissions to no effect.
Frustrated I rewrote the module from scratch by copying and pasting the code into a new module.
It works fine, until I was forced to refresh the cache again to update some java script libraries...
Is there another rebuild that I am missing besides permissions that could be failing?
I have tried disabling and re-enabling the module and the permissions as well.
Comments
Which Module Page
Which module page are you talking about ?
admin/module or your custom menu created in custom module.
If custom menu in custom module, please can you share the code ?
You should always show code.
You should always show code. Otherwise we are just guessing.
Did you put the page callback in a file other than the .module file?
If so, you need to add the 'file' attribute to your hook_menu() definition.
If not, you need to show us some code so we aren't trying to guess what you did.
Code
The thing is I didn't change the code I just cleared the cache and it stopped working.
Anyways here is the code from the from the hook_menu function which is what I believe is relevant:
And here is the code from the hook_permission which may also have some effect:
The call back function is in the same file I can post it to if it is relevent.
Maybe this has something to do with it.
I was looking at the following code from page_example_menu
...
Could it be the lack of:
or
I based my code off of the form api menu callbacks so I didn't think to include these two items?
Did you put the page callback
Did you put the page callback in a file other than the .module file?
The page call back is in the
The page call back is in the .module file.
Autoload
Have you checked the autoload part for %dispplay ?
What do you mean by auto load
What do you mean by auto load?
Is there a table in drupal
Is there a table in drupal somewhere, that stores the url's given by the menu function?
My gut is telling me that if I look at that table I will probably find one or more corrupted records.
menu_router table
So I have looked and found that for some reason all my other modules have information stored in the menu router table but not this one.
Could there be a problem with the calling of the menu function perhaps?
What's the machine name of
What's the machine name of your module?
Status
Ok here is where I am at:
I have files named:
avif_report_ownership.info
avif_report_ownership.module
The contents of the info file:
The contents of the module file:
Result, The following error:
The requested page "/avif/report/ownership/" could not be found.
... and me pulling my hair out...
Okay so far this seems to be
Okay so far this seems to be working at this url:
site/avif/ownership/report/
for some reason %display seems to have something to do with it.... I wonder if it was a reserved word some where or some such.
Think of '%' being anonymous
Think of '%' being anonymous argument, it can be any value. When you use a named argument like display there needs to be an auto loader as mentioned earlier. In this case it is expect a function called display_load(). It is generally used to convert and argument from a string/number to an object. So then the callback function would expect the object.
This:<?php $items['avif
This:
Should not have a trailing slash. It should be this:
It's always the little things
It's always the little things :|
Thanks allot.