Hi Xano,

Just FYI, I've just installed the dev version and I obtained error messages showed in the image in attachment.

Elthough the errors, all seem works fine.

Thank you very much for your work

MXT

Comments

xano’s picture

Title: Error message at first installation » PHP permission warning if predefined indexes cannot be read

Index will automatically try to import predefined indexes, but for that it needs permission to read files from its own directory. Index will still work if has no permission, but you won't be able to use the predefined indexes until you grant read rights and import the indexes manually again or reinstall the module.

xano’s picture

Assigned: Unassigned » xano
Status: Active » Needs review
StatusFileSize
new1.31 KB
seutje’s picture

why don't u just change the format to just an array or object or w/e?

that was u can just include it. Like all other exportables

xano’s picture

That's possible, but that would require code to create a representation of the object in code. The only (real) advantage is that exported indexes can be edited very easily, but it requires a lot more code to do the actual export.

Not sure what to do here.

seutje’s picture

the editing is actually rather minor, I haven't manually edited an exportable to date

other (real) advantages include conformity with the exportables philosophy.
ability to turn created indexes into sane code that can create overridable defaults (à la default views).
ability to include or simply add to a custom module (hook_default_indexes?).

I haven't looked at your current data structure, but I assume that structure could be retained, the extra amount of code to turn an object/array into the declaration of an object/array should be rather minimal

xano’s picture

Currently index objects are serialised and offered as a downloadable *.txt file. This allows for very simple import and export code.

I'm not sure what overridable defaults and custom modules have to do with importing and exporting indexes. Could you elaborate on that?

seutje’s picture

well if a module want to leverage this module for creating an overview page of the structure of it's entities, it could simply provide a default index for it, so the user isn't forced to create it himself, or even import it, it'll just come with turning on the module
if the user isn't entirely happy with that default index, he can go in and edit it, retaining the ability to go back to the default provided by the module
or if even another module extends that module, it could also extend it's default index

xano’s picture

That's what currently happens. Upon installing the module predefined indexes are imported and they can be edited and deleted and imported again like any other index.

xano’s picture

Assigned: xano » Unassigned