plomino / Plomino

Powerful and flexible web-based application builder
33 stars 37 forks source link

View is not working #584

Closed linx79 closed 9 years ago

linx79 commented 9 years ago

Hi,

I am trying to create a new view but the listing is not showing.. I have created few moths before which are all ok except this new one which I just created..

In the selection formula i insert this line plominoDocument.getItem("NCRRegisForm")

and after I add in the necessary column the listing is not displaying at all, just a blank grid.. And when I try to create a column it takes ages to be done.. any idea what went wrong?

ebrehault commented 9 years ago

Probably a corrupted index. Just go to Design tab, and click Refresh database.

linx79 commented 9 years ago

Hi eric... i can't i tried many times to refresh the database but it give me errors.

ebrehault commented 9 years ago

First of all, you need to disable automatic refreshing on design update (check "Do not re-index documents on design changes" in settings) so it does not take ages everytime you change something in your view.

Now, if you have errors, the traceback should give you some hints to understand what is wrong. Fix the gilty formula, and then refresh the db.

linx79 commented 9 years ago

Hi Eric,

Thanks for the info, setting done~ Now, here is the error I got when Refresh Database

 Traceback (innermost last):
 Module ZPublisher.Publish, line 60, in publish
 Module ZPublisher.mapply, line 77, in mapply
 Module ZPublisher.Publish, line 46, in call_object
 Module <string>, line 4, in manage_refreshDB
 Module AccessControl.requestmethod, line 70, in _curried
 Module Products.CMFPlomino.PlominoDesignManager, line 125, in manage_refreshDB
 Module Products.CMFPlomino.PlominoDesignManager, line 139, in refreshDB_async
 Module plone.app.async.service, line 119, in queueJob
 Module plone.app.async.service, line 114, in queueJobInQueue
 Module plone.app.async.service, line 127, in queueJobInQueueWithDelay
 Module plone.app.async.service, line 100, in getQueues
 Module zope.component._api, line 169, in getUtility
 ComponentLookupError: (<InterfaceClass plone.app.async.interfaces.IAsyncDatabase>, '')

Wonder what is the problem. Thanks~

ebrehault commented 9 years ago

It looks like you have plone.app.async running on your server. Do you know why ?

linx79 commented 9 years ago

plone.app.async? What is that.... Can I uninstall it?

ebrehault commented 9 years ago

It allows to run heavy processes on a secondary ZEO client. It is probably a dependecy of one of your installed products. Plomino does work fine with p.a.async. But p.a.async must be properly configured.

If it is a dependency of one of your product, you cannot remove it unless you uninstall this very product.

linx79 commented 9 years ago

Hi Eric,

I think this async was installed previously because we thought it can do synchronization. I only installed Plomino and EEA Daviz so far... think it is safe to removed

linx79 commented 9 years ago

Hi Eric,

I have get rid of the async error.. and I am able to run the DB efresh.. however I got another error And why cant I delete any of my form once created? If I delete the form I will have error when I try to save my form/refresh Database/Document reindex

  Traceback (innermost last):
  Module ZPublisher.Publish, line 60, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module <string>, line 4, in manage_refreshDB
  Module AccessControl.requestmethod, line 70, in _curried
  Module Products.CMFPlomino.PlominoDesignManager, line 129, in manage_refreshDB
  Module Products.CMFPlomino.PlominoDesignManager, line 234, in refreshDB
  Module <string>, line 4, in refreshPortalCatalog
  Module AccessControl.requestmethod, line 70, in _curried
  Module Products.CMFPlomino.PlominoDesignManager, line 368, in refreshPortalCatalog
  Module Products.CMFPlone.CatalogTool, line 353, in catalog_object
  Module Products.ZCatalog.ZCatalog, line 476, in catalog_object
  Module Products.ZCatalog.Catalog, line 320, in catalogObject
  Module Products.ZCatalog.Catalog, line 270, in updateMetadata
  Module Products.ZCatalog.Catalog, line 396, in recordify
  Module Products.CMFPlomino.PlominoDocument, line 608, in Title
  AttributeError: 'NoneType' object has no attribute 'getDynamicDocumentTitle'

When I try to run reindex in Portal catalog I get this error

Traceback (innermost last):
Module ZPublisher.Publish, line 60, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module <string>, line 4, in refreshPortalCatalog
Module AccessControl.requestmethod, line 70, in _curried
Module Products.CMFPlomino.PlominoDesignManager, line 368, in refreshPortalCatalog 
Module Products.CMFPlone.CatalogTool, line 353, in catalog_object
Module Products.ZCatalog.ZCatalog, line 476, in catalog_object
Module Products.ZCatalog.Catalog, line 339, in catalogObject
Module Products.ZCTextIndex.ZCTextIndex, line 184, in index_object
Module Products.CMFPlomino.PlominoDocument, line 765, in SearchableText
Module Products.CMFPlomino.PlominoUtils, line 302, in asUnicode
Module Products.CMFCore.MemberDataTool, line 369, in __str__
Module Products.CMFCore.MemberDataTool, line 273, in getMemberId
Module Products.CMFCore.MemberDataTool, line 264, in getUser
TypeError: exceptions must be old-style classes or derived from BaseException, not str
ebrehault commented 9 years ago

no idea, sorry but probably not those ones

On Mon, Oct 27, 2014 at 2:31 AM, linx79 notifications@github.com wrote:

Hi Eric,

I have remove eea.daviz.. but still the error wouldnt go.. my egg looks like this.. any idea what addon have plone.app.async

eggs= plone pillow products.ploneHotfix20130618 plone.app.iterate Products.CMFPlacefulworkflow Products.CMFPlomino

— Reply to this email directly or view it on GitHub https://github.com/plomino/Plomino/issues/584#issuecomment-60541631.

linx79 commented 9 years ago

Eric,

My form is not working, it keep saying that fields are missing. I have temporarily unlink the view from the form and now I can save the entry again. But my initial problem is not solve yet.... I need to test out if I were to create a new View will it work. Also.. When i run a database refresh I got these error in my views but these views are showing without error in actual page...

 line 11, in column_-_ExportNCR_-_ncrPhotoB_-_formula 
 AttributeError: 'unicode' object has no attribute 'keys' 

My view script for this field looks like this

 db = plominoDocument.getParentDatabase()
 a = plominoDocument.attPhoto
 docID = plominoDocument.id
 #thelink = db.absolute_url()
 thelink = "<img width=80 height=80 src="+db.absolute_url()+"/plomino_documents/"+docID+"/getfile?filename="
 b = a.keys()
 for x in b: return thelink+x+">"
linx79 commented 9 years ago

also, is there a way to reduce the font size in view?

linx79 commented 9 years ago

Hello Eric.. you there??

ebrehault commented 9 years ago

Hi,

regarding 'unicode' object has no attribute 'keys' , I guess some of your docs have a attPhoto field which is not a dictionary, so b = a.keys() returns an error. You can do:

if hasattr(a, 'keys'):
    b = a.keys()
else:
    b = []

And to change the font size in view, you just need to fix that in your Plone skin.