Tried to enable listing_menu module and getting following error

Fatal error: Cannot redeclare menu_overview_page() (previously declared in C:\xampp\htdocs\mysite\modules\menu\menu.admin.inc:13) in C:\xampp\htdocs\mysite\modules\menu\menu.admin.inc on line 22

CommentFileSizeAuthor
#15 listing_menu.zip1.6 KBNewZeal
#6 listing_menu.zip1.59 KBNewZeal

Comments

NewZeal’s picture

OK thanks for that. I have included code which does a test before installing the module. Changes committed to dev.

vlooivlerke’s picture

Setting the menu block live give me this error:

Fatal error: Call to undefined function listing_get_state_name() in ./sites/all/modules/listing/listing_menu/listing_menu.module on line 35

vlooivlerke’s picture

Then on the listing search page i get this error:

Fatal error: Call to undefined function _listing_analyze_url() in ./sites/all/modules/listing/listing_menu/listing_menu.module on line 28

NewZeal’s picture

Bug found and fixed and committed to dev.

vlooivlerke’s picture

Hi, I still get both errors with new dev.

I have uninstalled the listing-menu module and reinstalled. My Taxonomy is very big, can that be the problem?

NewZeal’s picture

StatusFileSize
new1.59 KB

Maybe the dev didn't have the new module, attached.

vlooivlerke’s picture

After I have uninstalled all the modules (The uninstall additions to the cvs file does not reflect in the tar download. I had to manually add your new additions.) I then enable the menu module.
It creates an menu "Listing" but there is no menu links inside it???
It also creates a block "listing: Listing Menu". When I set this block to a region I get the above error message. I have enabled the location search module and have a vocabulary with terms linked to my listing content type.

NewZeal’s picture

The menu items are added automatically from any vocabularies associated with content types which have been selected as listing content types. If you have no terms in vocabs associated with listing content types then you will have an empty menu.

vlooivlerke’s picture

Fatal error: Call to undefined function listing_get_state_name() in .../sites/all/modules/listing/listing_menu/listing_menu.module on line 35

I create a fresh drupal install. I enable views, location, gmap.
I create a taxonomy called listings and associate it with a page content type (add 3 terms to it)
I activate the listing module and set the content type to page
I activate menu module, it creates a menu type called listing but it is empty
I activate the listing:menu block and get the above error.

any help?

vlooivlerke’s picture

Also i get this error when you ininstall the menu module

user warning: Unknown column 'name' in 'where clause' query: DELETE FROM menu_custom WHERE name='menu-listings' in .../sites/all/modules/listing/listing_menu/listing_menu.install on line 11.

vlooivlerke’s picture

user warning: Duplicate entry 'menu-listings' for key 'PRIMARY' query: INSERT INTO menu_custom (menu_name, title, description) VALUES ('menu-listings', 'Listings Menu', 'Menu created by listings module for content types and their categories.') in .../modules/menu/menu.admin.inc on line 541.

I get this warning when i re-install the menu module after an uninstall.

vlooivlerke’s picture

Here is some of my debug readings.

    * Session Process: session variables being processed: Array ( [country] => za )
    * Session Process: URL arguments: Array ( [country] => [distance_units] => miles )
    * Session Process: state/province not in url

The I untick the country and state urls

    * Session Process: session variables being processed: Array ( [country] => za [original_url] => listing-search [targeted_search_save] => [taxonomy_term_save] => [type_save] => [distance_save] => [distance_units] => mile )
    * Session Process: URL arguments: Array ( [city] => [distance_units] => mile )
    * Session Process: city not in url

Then i make an autocomplete search for a town

    * Session Process: session variables being processed: Array ( [country] => za [original_url] => listing-search [targeted_search_save] => [taxonomy_term_save] => [type_save] => [distance_save] => [distance_units] => mile )
    * Session Process: URL arguments: Array ( [city] => [distance_units] => mile )
    * Session Process: city not in url
    * Generate URL: search parts Array ( [0] => Sedgefield [1] => WC )
    * Generate URL: state western-cape
    * Search Submit: url to go to: listing-search/sedgefield/all/all/25
    * Session Process: session variables being processed: Array ( [country] => za [original_url] => listing-search [targeted_search_save] => [taxonomy_term_save] => [type_save] => [distance_save] => [distance_units] => mile [targeted_search] => [type] => all [taxonomy_term] => [distance] => )
    * Session Process: URL arguments: Array ( [city] => sedgefield [type] => all [term] => all [distance] => 25 [distance_units] => mile )

I Also get this warning:

warning: Wrong parameter count for explode() in .../sites/all/modules/listing/listing_location/listing_location.module on line 1205.

hope it helps

NewZeal’s picture

Thanks for those. Bugs all fixed and committed.

vlooivlerke’s picture

Title: Fatal error: Cannot redeclare menu_overview_page() » Fatal error: Call to undefined function _listing_analyze_url()

Hi commited the paches to my install but still get this error message when I visit any listing-search page.

Fatal error: Call to undefined function _listing_analyze_url() in /home/ilaaik/public_html/sites/all/modules/listing/listing_menu/listing_menu.module on line 28

What the module do is test if the location module is there, but mine is there, I install it before I activate the menu module.

Is the menu module supposed to create a menu without the location module?
Could there be something wrong with my zipcodes?

The problem seems with this function: _listing_analyze_url().
This is a fresh install and I don't have any other modules that can influence the path.

Everything else in this module works perfect for me and I can do great location searches.

NewZeal’s picture

StatusFileSize
new1.6 KB

Sorry that function name was incorrect. Try attached.

vlooivlerke’s picture

Ok, success

But you will get another function error. but to fix that change line 37
from $path = listing_goto_url($params, 'main_url').'/'.$title;
to $path = listing_location_goto_url($params, 'main_url').'/'.$title;

Thanks

vlooivlerke’s picture

Now that I have the menu working I notice only the deepest term work.

e.g: I have a content type business with terms shopping, dining, ...
but I have more terms under dining, like pizzeria, vegetarian, ...
- shopping
- dining
-- pizzeria
-- vegetarian

If I create a business listing and tag it with dining, pizzera and select the term pizzera the node shows
If I select dining, no node shows, but it should show in theory.
That is my bug report

Now some questions.
1. I see the drupal menu (Listings menu) does not contain any menu links only the menu block makes links, Is the drupal menu supposed to be empty or does it get populated?
2. Is it possible to only show the first term level in the menu?
3. How can I add a <span> tag to the menu links? (I can Inject <span> tags via themesettings.tmp file but only for drupal menu system not in your block links)
4. Would it be possible to use the Hierarchical Select form element for vocabularies? (Hierarchical Select module)

NewZeal’s picture

You need to explain what you mean by "node shows". I'll have to admit I created this module as a short cut to a particular result. It is implemented here: http://dev.southms.com/listing-search/all-cities/Accomodations and you can see that when you click on a top level menu item you get all the items in all the terms below. When you click on a lower level one you get the items within that term. This menu is set up with the top items such as Accommodation, Activity etc appearing as separate vocabs and the lower items are the terms in the vocab.

You are possibly asking for something outside the current use case. I believe this module does what it is currently meant to do. I should probably improve the documentation.

Changing this to a feature request.

vlooivlerke’s picture

Category: bug » feature

Thanks, I have noticed how the terms jump to the correct level and it is great.

I know now what is my problem, I have 1 Vocabulary with 300 therms in a tree level

I should split my taxonomy up into multiple Vocabularies, then It will "jump" to only show the correct vocabulary and its terms. correct? Going to test this out a bit more.

NewZeal’s picture

You may be better off creating your own custom menu using the Drupal interface. Listing_menu is pretty basic.

NewZeal’s picture

Status: Active » Closed (fixed)