Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Item Manager Extended (Beta)
(2015-04-30, 10:03:41)Rico Wrote: I must say that before installing GetSimple on my server I got this error message (here is that "usr" again, maybe it has something to do with the server...):
Warning: ini_set() [function.ini-set]: Unable to access /usr/home/mywebsite.com/web/data/other/logs/errorlog.txt in /usr/home/mywebsite.com/web/admin/inc/common.php on line 128
That is all you need to know: PHP process have no write-access to this file. That is why the information in the custom fields is not saved too. Directories should be 755 and your files 644.
Reply
Hello,

I think I've solved the problems commented the other day. I'll point out here the solution, just in case it is useful for someone.

The problem of the wrong URL in the uploading window was easy to solve from the clue you gave me. The URL was...
http://mywebsite.com//usrplugins/imanager/uploadscript...
...and should be...
http://mywebsite.com/plugins/imanager/uploadscript...

In /plugins/imanager/uploadscript/model/generator.php there are the following lines:

// Modify our window url parameter
$tpl['formtemplate']['upload_script_url'] =
'http://'.$_SERVER['SERVER_NAME'].'/'.str_replace($_SERVER['DOCUMENT_ROOT'], '',
str_replace("\\","/",$tpl['formtemplate']['upload_script_url']));

This line...

'http://'.$_SERVER['SERVER_NAME'].'/'.str_replace($_SERVER['DOCUMENT_ROOT'], '',

...must be changed into this (in my case):

'http://'.$_SERVER['SERVER_NAME'].'/'.str_replace('/usr', '',

My DOCUMENT_ROOT is "web"; I don't know where the "/usr" comes from... In any case, $ _SERVER ['DOCUMENT_ROOT'] must be changed into the string to remove from the URL.

The other problem was harder to solve. The custom fields of the categories were not saved, or what is worse, were saved sometimes and sometimes were not. I got a warning (not error) message related to permissions before installing GetSimple, so I thought the problem might be related to permissions. But my folders were writable, GetSimple and other plugins worked well, and according to GetSimple Website Health Check, everything was OK... After struggling for a few days, I realized that the custom fields were not saved when I named them with initial capital letter... That was all. I think there are also problems if they start with a number, and I guess the same will happen with spaces and special characters.

So another suggestion for version 2.0 (or is it 1.0?): Warning text in "Configure" section about unsupported characters in name fields, or automatically renaming (internally) those fields.

I'll point out a couple more of things I've observed:

It shouldn't be allowed to write the same name for different custom fields in the same category. If the user does this, then there will be problems.

And above all: You can't create a new item with the name of an exisiting one (you get a warning), but if you are editing an item, you can change its name into an existing item name. If you do this, the old item is deleted (with no warnings), but not their images. From this moment, it seems the relationship between items and their images is partially or totally broken, from what I've seen. When items are deleted, their images aren't. This is not solved even after deleting all items and categories. Perhaps the field used by the script to identify an item should be an automatically generated number...

I was going to use Item Manager in my next project, but the latter problem is quite serious... It's a known bug or it happens only to me...? If it's a bug, is it solved in next version?

Thanks for your help.
Reply
Hi Rico

thank you for your reporting!

(2015-05-08, 01:57:02)Rico Wrote: I'll point out a couple more of things I've observed:

It shouldn't be allowed to write the same name for different custom fields in the same category. If the user does this, then there will be problems.


I take a different view. In my view the field names are ID’s and should to be unique (something like columns in a database table) - How else can you get correct access the item fields? Why don't you use Field Labels for your purposes?
Reply
Hi Bigin,

Indeed, as you said, the field names must be unique. That's why I think the script should prevent the end user to enter two identical names.

Maybe the easiest solution to the problems I commented would be not to allow end users to do these things:
1-Writing several identical field names within the same category, or with invalid characters.
2-Renaming an existing item to another existing item name within the same category. This would be the most important thing, as if this is allowed, the result is deleted data without warning the user and corruption of correct functioning of the script, as I commented in my previous post. I guess the only way to fix this malfunction would be to hand edit the XML files.

I think the end user shouldn't be allowed to do anything that could cause data deletion without a previous warning, or script malfunction. For the tests I've done, it is likely that what I said above would be sufficient to achieve this.

There are other things that could be improved, but they are not as important. For example, if the items have some kind of AutoNumber ID, the end user would not have to worry about writing different names for all items.
Besides, the "title" field admits long strings and special characters, and perhaps a long ID with special characters is not the best idea... (I don't know). If the AutoNumber ID of each item is shown in "All items" list, you can find it there if you want to access a particular item with PHP from the template.
Imagine a "Gallery" category with 100 items: pictures of dogs, cats and birds. What kind of titles the users are expected to write? Titles like "Bird singing", "My dog", "My dog on the couch", "My cat on the couch"... After 50 items, finding a unique name for each item will be quite tedious, and the users will be continually getting messages like these: "Item with entered 'My dog in the garden' name already exists", "Item with entered 'The dog in the garden' name already exists", "Item with entered 'My dog in the garden 2' name already exists"...

As I said, I think this is a very promising plugin with many possibilities, so I've been testing it a lot. For small websites with a fixed (or very slowly increasing) number of pages, and end users with few computer skills, GetSimple & Item Manager & Imagizer (or Image Resizer) is the best combination I know (although it wouldn't be a bad idea to merge Item Manager with I18N Special Pages!) It's in Beta version, so there are many things that can be improved (I could suggest a few) but I think the most important two are those I mentioned above.

Finally, a few more suggestions; less useful than those in my first post, but easier to implement, I think:

-The date should be stored in the XML files in a standard format that allows sorting. For example: Instead of 8 May 2015, something like 2015-05-08T23:21:01+00:00 (W3C standard).
-Selected category should be persistent when moving from one section to another ("view all", "add new" and "configure").
-Those Reload buttons with two different designs can be a little confusing. They give the impression of having different uses. I'd choose the gray one, with the text "Reload..."
-When you are editing an item, I think the drop-down list of categories should not be there. It is unrelated to the edition of a particular item. And the "Add new" button should not be highlighted.

That's enough for today!
Reply
Thank you for your comment.  Oops, my fault, I must've misread your comment and interpreted differently :-) Of course, you are right and YES, most of these suggestions were already implemented in version 2.0. This newer version has an improved user interface and many new features.
Reply
OK, I'm looking forward to testing (and using) the next version.
Reply
A new beta version is available: https://github.com/bigin/ItemManager_2.0
Reply
Hello!

Installed plugin and found some bug, or maybe I don't understand it Wink

When I crate a Category it doesn't appear under Categories tab.... But when I add some fields - I can choose a Category Ive created.

[attachment=591]

[attachment=592]

If I create a category using Cyrillic characters - would it work in components in this case:
 
Code:
// setup category
ImCategory::setCategory('Комплекси');


UPD 1
According to the tutorial - I can create several fields with image upload possibility.
image-1
image-2 and so on....

But when I try to save - I get error The image upload field can only be used once per item.
Reply
Hello

Which ItemManager version do you use? If you use version 2.0, then it is a wrong thread here.

(2015-07-21, 19:07:37)ross104 Wrote: When I crate a Category it doesn't appear under Categories tab.... But when I add some fields - I can choose a Category Ive created.

I wasn't able to reproduce that, everything seems to work here. Do you get an error message? Did you turn on error reporting in PHP / DebugMode inGetSimple?

(2015-07-21, 19:07:37)ross104 Wrote: If I create a category using Cyrillic characters - would it work in components in this case:


Code:
// setup category
ImCategory::setCategory('Комплекси');

Is this a question? :-) I hope so, try it. We are in the Unicode age and yes, you can use it in this case.

(2015-07-21, 19:07:37)ross104 Wrote: UPD 1
According to the tutorial - I can create several fields with image upload possibility.
image-1
image-2 and so on....

But when I try to save - I get error The image upload field can only be used once per item.

That is correct, you can't use multiple Image fields in same category. An Image field already contains multiple images. In your template files, you can loop through the images field and output each image:

PHP Code:
if(!empty($item->fields->image))
{
 
   foreach($item->fields->image->imagefullpath as $image_path)
 
   {
 
       echo '<img alt="" src="'htmlspecialchars($image_path). '">';
 
   }

Reply
Hi

Took me a few days in order to test IManager but so far I didn't succeed ;-(

I feel this is a great plugin which has lots of possibilities but as some members here I am not very skilled with API's ...

Would it be possible to have examples zipped in a file so that we can work from there ?

Best Regards
Eric
Reply
Hi,
please shortly describe your project or your problem, categories & fields you have created etc… And what items/elements would you like to show exactly in frontend.
Reply
Hi

Well ... So far I am simply trying to reproduce your sample (rings) ;-)

1- = when I want to add 2nd image in fields I have a message "The image upload field can only be used once per item."

2- From there I can't test Frontend. BTW I did have a look @ im_details_page_generator and was looking ( lg12-14 ) for :
  imanager/tpl/frontend/page.details.tpl
  imanager/tpl/frontend/page.details.loop.tpl

  >> frontend directory and files doesn't exist ... so how are tpl files builded ?

... this is why it would be great to have your sample so that I could test basics ;-)

Best Regards
Eric

PS : I am using latest GetSimple V 3.3.6
Reply
Do you use IM 2.0 or earlier?
Reply
(2015-08-16, 00:02:04)Bigin Wrote: Do you use IM 2.0 or earlier?

Yes : Version 2.0
Reply
(2015-08-16, 00:04:00)Erick67 Wrote:
(2015-08-16, 00:02:04)Bigin Wrote: Do you use IM 2.0 or earlier?

Yes : Version 2.0



so it’s not surprising that this is not working. The instructions in this thread are only valid for IM earlier than version 2.0


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
THIS IS AN OLD VERSION. Get the new one at the URL: http://get-simple.info/extend/plugin/itemmanager/936/
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Reply




Users browsing this thread: 1 Guest(s)