Hi,
After installing the module, i get this error on the setting page for RDF

Notice: Undefined index: rdf_mapping -rdfx_mapping_overview() (32 -/home/sabresim/public_html/sites/all/modules/rdfx/rdfx.admin.inc).

Any help would be appreciated,

BR
Itzhak

Comments

scor’s picture

please make sure you have the RDF module enabled (it's in core). save the modules form to be sure it's enabled.

also please post a list of the contrib modules you have enabled.

phizes’s picture

I'm sure this is related, watchdog reports the following errors 5 times each when visiting admin/config/services/rdf, the first error is followed by the second, in pairs.

Notice: Undefined index: rdf_mapping in rdfx_mapping_overview() (line 32 of /var/www/example.com/public_html/sites/all/modules/rdfx/rdfx.admin.inc).

Followed by:

Warning: Invalid argument supplied for foreach() in rdfx_mapping_overview() (line 42 of /var/www/example.com/public_html/sites/all/modules/rdfx/rdfx.admin.inc).

For a total of 10 errors.

I currently have the following modules enabled:

Drupal core 7.10
Block, Blog, Comment, Contact, Contextual links, Dashboard, Database logging, Field, Field SQL storage, Field UI, File, Filter, Help, Image, List, Menu, Node, Number, Options, Overlay, PHP filter, Path, RDF, Seven, Shortcut, System, Taxonomy, Text, Toolbar, Update manager, User
Automatic Nodetitles 7.x-1.0
Automatic Nodetitles
Chaos tool suite (ctools) 7.x-1.0-rc1
Chaos tools
CKEditor - WYSIWYG HTML editor 7.x-1.6
CKEditor
Colorbox 7.x-1.2
Colorbox
Comment notify 7.x-1.0
Comment notify
Entity API 7.x-1.0-rc1
Entity API
Global Redirect 7.x-1.4
Global Redirect
Google Analytics 7.x-1.2
Google Analytics
IE6 No more 7.x-1.0-beta3
IE6 No more
ImageCache Actions 7.x-0.0
Imagecache Actions, Imagecache Canvas Actions
IMCE 7.x-1.5
IMCE
jCarousel 7.x-2.6
jCarousel
Pathauto 7.x-1.0
Pathauto
RDF Extensions 7.x-2.0-alpha4
External RDF Vocabulary Importer, RDF UI, RDFx
Site verification 7.x-1.0
Site Verification
Token 7.x-1.0-beta7
Token
transliteration 7.x-3.0
Transliteration
views 7.x-3.0
Views, Views UI
xmlsitemap 7.x-2.0-rc1
XML sitemap, XML sitemap engines, XML sitemap menu, XML sitemap node

Apart from that there are 3 minor custom modules, one is just exported views, a hidden captcha only active on public forms, and one for miscellaneous odds and ends. The core rdf module has been enabled and generating markup for several months already.

This happens on both the live site and our local dev server. I'm going to go with schema.org module for now for the live site, albeit short of marking up in other vocabularies, but will keep the local dev server with rdfx. Please let me know if you need any further information or testing.

Update

It seems the menu bundles do not have the rdf_mapping key. Looking at the core rdf module, it seems that seeing as menu.module does not implement hook_rdf_mapping, and there is no rdf_mapping in the database for menus, then the rdf_mapping key would not exist. I am not completely certain as this is the first look I have taken at rdf code and I have not used entities to a great degree.

jdube’s picture

I am seeing the same messages as #2, upon clicking RDF publishing settings, but I get only a total of 8 messages (4 pairs).

NOTE: When I try to enter Prefix/Namespace URI combinations, for example: dbp / http://dbpedia.org/property/; dbpedia / http://dbpedia.org/ontology/; or linkedmdb / http://data.linkedmdb.org/resource/, I get no confirmation or response, nor Watchdog report, and the namespace is not added to the list. (Perhaps the error messages are related to this)

Enabled modules:
Drupal core 7.10: Block, Color, Contact, Contextual Links, Dashboard, Database logging, Field, Field UI, Field SQL storage, File, Filter, List, Menu, Node, Number, Options, Overlay, Path, RDF, Search, Shortcuts, Statistics, System, Taxonomy, Text, Toolbar, User

Chaos tools 7.x-1.x-dev
Backup and Migrate 7.x-2.2
Entity API 7.x-1.0-rc1+21-dev
Libraries 7.x-1.0
robots.txt 7.x-1.0
External RDF Vocabulary Importer 7.x-2.x-
RDF UI 7.x-2.x-
RDFx 7.x-2.x-
SPARQL API 7.x-2.x-
SPARQL Endpoint 7.x-2.x-
SPARQL Endpoints Registry 7.x-2.x-
SPARQL Views7.x-2.x-dev

Any suggestions?

akk’s picture

change the line 32
from

$rdf_mapping = $bundle['rdf_mapping'];

to

if (!empty($bundle['rdf_mapping'])) {
      $rdf_mapping = $bundle['rdf_mapping'];
	  }
Schnittmenge’s picture

I got only one error in line 60:
Notice: Undefined variable: rdftype in rdfx_mapping_overview() (line 60 of .../drupal/profiles/w/modules/contrib/rdfx/rdfx.admin.inc).

The proposed change in line 32 gives me more errors.

Drupal 7.14

kingfisher64’s picture

Version: 7.x-2.0-alpha4 » 7.x-2.x-dev
Issue summary: View changes

I'm getting the following notices with drupal 7.23 & the latest rdfx dated 2013-Oct-01. There's about 8 of each notices.

Notice: Undefined index: rdf_mapping in rdfx_mapping_overview() (line 32 of sites/all/modules/rdfx/rdfx.admin.inc).

Warning: Invalid argument supplied for foreach() in rdfx_mapping_overview() (line 42 of sites/all/modules/rdfx/rdfx.admin.inc).
miromarchi’s picture

Hi scor!
Same as #5.
I have a new installation with rdfx installed and enabled in the profile.
But I have no custom modules using it.
When I visit RDF publishing settings at admin/config/services/rdf I see the

Notice: Undefined variable: rdftype in rdfx_mapping_overview() (line 60 of /var/www/retebuonvivere/pan2/sites/all/modules/contrib/rdfx/rdfx.admin.inc).

kingfisher64’s picture

I'm still getting a lot of errors same as #6 when using the very latest dev. Has any progress been made on these issues?

kingfisher64’s picture

@scor - as suggested in the irc #drupal channel I've tried installing the latest dev with a plain drupal install (nothing added) and there are no errors.

It appears that when other contrib mods are installed we get these errors. What can we do to sort this out.

Many thanks & happy new year