[Building Sakai] Course Tools getting deleted

Bryan Holladay holladay at longsight.com
Fri Jul 20 05:55:44 PDT 2012


We've seen this issue lately, it could be this:

Here's what Matt Jones said about it:

I believe we've tracked it down to this issue:
https://jira.sakaiproject.org/browse/KNL-797

The problem is that if you're importing or copying one site to another it
has to erase everything from the site and re-add it again, rather than
updating it. If something happens during that processing (it goes slow and
the instructor presses the button again) or there's a network problem, or
something else happens, the site can be damaged. Normally this shouldn't
happen because the method is in a transaction, but so we're not entirely
sure what happens here, and it doesn't seem to happen very often.

-Bryan


On Fri, Jul 20, 2012 at 6:50 AM, Miguel Carro Pellicer <
farreri.sakai at gmail.com> wrote:

>  Do you have any custom logic that searches for sites that meet some
> requirements? (Like title, status,  some property, etc..)
>
>
>  El 20/07/2012 10:24, Nkululeko Phakela escribió:
>
> Hi Miguel,
>
> What I do is based on:
>
> https://confluence.sakaiproject.org/display/BOOT/Using+the+SiteService
>
> where I get the site based on the current context.
>
> Site site =
> siteService.getSite(toolManager.getCurrentPlacement().getContext());
>
> Is this bad?
>
> Kind Regards,
> Nguni
>
> -----Original Message-----
> From: Miguel Carro Pellicer [mailto:farreri.sakai at gmail.com<farreri.sakai at gmail.com>
> ]
> Sent: Fri 7/20/2012 10:11 AM
> To: Nkululeko Phakela
> Cc: sakai-dev at collab.sakaiproject.org
> Subject: Re: [Building Sakai] Course Tools getting deleted
>
> Sakai doesn't include any logic that produces this problem, normally is
> logic introduced by developers or custom developments :)
>
>
>
> El 20/07/2012 9:57, Nkululeko Phakela escribió:
>
>
>         Hi Miguel,
>
>         This makes a lot of sense. It is interesting that this would
> happen to a few sites, but not all of them that are using a tool that does
> this.
>
>         I will look into it and see if after doing the changes, the tools
> don't disappear. The weird part, on the local development machine, this is
>         never a problem, only in production.
>
>         Cheers,
>         Nguni
>
>
>         -----Original Message-----
>         From: Miguel Carro Pellicer [mailto:farreri.sakai at gmail.com<farreri.sakai at gmail.com>
> ]
>         Sent: Fri 7/20/2012 9:54 AM
>         To: sakai-dev at collab.sakaiproject.org
>         Subject: Re: [Building Sakai] Course Tools getting deleted
>
>         Hi Nkululeko.
>
>         Are you using any custom tool to manage sites using SiteService?
> How you manage this sites?
>
>         This is an idea, maybe your problem is that you are using getSites
> function from siteService, it returns a list of a soft version of Site
> objects ( Without tools and pages).
>
>         If you save this object with siteService.save, you will lose all
> pages and tools.
>
>         Example:
>
>         BAD:
>                 Map<String, String> propertyCriteria =new
> HashMap<String,String>();
>                 propertyCriteria.put("favouriteSite","true");
>
>                 List<Site> templateSites =
> siteService.getSites(SelectionType.ANY, null, templateId,
>                          propertyCriteria, SortType.TITLE_ASC, null);
>                 Site newSite = (Site) templateSites.get(0);
>                 newSite.setTitle("New weird title"); <------Setting the
> title into a soft version of the object Site!
>                 siteService.save(newSite); <---- You saved the soft
> version, all pages and tools are lost.
>
>         GOOD:
>                 Map<String, String> propertyCriteria =new
> HashMap<String,String>();
>                 propertyCriteria.put("favouriteSite","true");
>
>                 List<Site> templateSites =
> siteService.getSites(SelectionType.ANY, null, templateId,
>                          propertyCriteria, SortType.TITLE_ASC, null);
>                 Site softSite = (Site) templateSites.get(0);
>                 Site newSite = siteService.getSite(softSite.getId());
>                 newSite.setTitle("New weird title"); <------Setting the
> title into the object with full data!
>                 siteService.save(newSite); <---- Saved and everything ok.
>
>         Maybe is this problem but i don't know, its only an idea
>
>         Hope it helps, Miguel.
>
>
>
>         El 20/07/2012 9:33, Nkululeko Phakela escribió:
>
>
>                 Hi All,
>
>                 We have been running into a weird problem recently. Some
> course sites will every now and then have all the tools in the site
> deleted, and so when one clicks on it, it says Site Unavailable. So then
> once I go into worksite setup and choose the relevant tools for the course
> then it appears again. However, this is a recurring problem. What could be
> the cause of this and what can we do to combat it?
>
>                 Any help is appreciated.
>
>                 Kind Regards,
>                 Nguni
>
>
>
>
>
>
>                 _______________________________________________
>                 sakai-dev mailing list
>                 sakai-dev at collab.sakaiproject.org
>                 http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
>                 TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
>
>         --
>
>
>          <http://www.samoo.es/>
>
>           <http://www.samoo.es/>
>
>         Miguel Carro Pellicer
>
>         Technical Manager - Director técnico
>
>         miguel.carro at samoo.es <mailto:miguel.carro at samoo.es<miguel.carro at samoo.es>
> >
>
>         +34 - 673 80 32 69
>
>         Skype: mcpellicer
>
>         www.samoo.es <http://www.samoo.es>
>
>
>
>         Este  correo  y  sus archivos asociados son privados y
> confidenciales y va dirigido  exclusivamente  a su destinatario. Si recibe
> este correo sin ser el  destinatario del mismo, le rogamos proceda a su
> eliminación y lo ponga en  conocimiento del emisor. La difusión por
> cualquier medio del contenido de  este  correo podría ser sancionada
> conforme a lo previsto en las leyes españolas, Ley Orgánica 15/1999 de
> Protección de Datos de Carácter Personal.  No  se autoriza la utilización
> con fines comerciales o para su incorporación a ficheros automatizados de
> las direcciones del emisor o del destinatario."
>
>
>
>         This mail and its attached files are confidential and are only and
> exclusively intended to their addressee. In case you may receive this mail
> not being its addressee, we beg you to let us know the error by reply and
> to proceed to destroy it. The circulation by any mean of this mail could be
> penalised in accordance with the Spanish legislation. Is not allowed the
> use of both, the transmitter and the addressee's, address with a commercial
> aim, or in order to be incorporated to automated data process or to any
> kind of files.
>
>
>
>         P Antes de imprimir este correo electrónico piense bien si es
> necesario hacerlo. El medioambiente es cosa de todos.
>
>
>
>
>
>
>
>
>                 This communication is intended for the addressee only. It
> is confidential. If you have received this communication in error, please
> notify us immediately and destroy the original message. You may not copy or
> disseminate this communication without the permission of the University.
> Only authorized signatories are competent to enter into agreements on
> behalf of the University and recipients are thus advised that the content
> of this message may not be legally binding on the University and may
> contain the personal views and opinions of the author, which are not
> necessarily the views and opinions of The University of the Witwatersrand,
> Johannesburg. All agreements between the University and outsiders are
> subject to South African Law unless the University agrees in writing to the
> contrary.
>
>
>
>
> --
>
>
>  <http://www.samoo.es/>
>
>   <http://www.samoo.es/>
>
> Miguel Carro Pellicer
>
> Technical Manager - Director técnico
>
> miguel.carro at samoo.es <mailto:miguel.carro at samoo.es<miguel.carro at samoo.es>
> >
>
> +34 - 673 80 32 69
>
> Skype: mcpellicer
>
> www.samoo.es <http://www.samoo.es>
>
>
>
> Este  correo  y  sus archivos asociados son privados y confidenciales y va
> dirigido  exclusivamente  a su destinatario. Si recibe este correo sin ser
> el  destinatario del mismo, le rogamos proceda a su eliminación y lo ponga
> en  conocimiento del emisor. La difusión por cualquier medio del contenido
> de  este  correo podría ser sancionada conforme a lo previsto en las leyes
> españolas, Ley Orgánica 15/1999 de Protección de Datos de Carácter
> Personal.  No  se autoriza la utilización con fines comerciales o para su
> incorporación a ficheros automatizados de las direcciones del emisor o del
> destinatario."
>
>
>
> This mail and its attached files are confidential and are only and
> exclusively intended to their addressee. In case you may receive this mail
> not being its addressee, we beg you to let us know the error by reply and
> to proceed to destroy it. The circulation by any mean of this mail could be
> penalised in accordance with the Spanish legislation. Is not allowed the
> use of both, the transmitter and the addressee's, address with a commercial
> aim, or in order to be incorporated to automated data process or to any
> kind of files.
>
>
>
> P Antes de imprimir este correo electrónico piense bien si es necesario
> hacerlo. El medioambiente es cosa de todos.
>
>
>
>
>
>
>    This communication is intended for the addressee only. It is confidential. If you have received this communication in error, please notify us immediately and destroy the original message. You may not copy or disseminate this communication without the permission of the University. Only authorized signatories are competent to enter into agreements on behalf of the University and recipients are thus advised that the content of this message may not be legally binding on the University and may contain the personal views and opinions of the author, which are not necessarily the views and opinions of The University of the Witwatersrand, Johannesburg. All agreements between the University and outsiders are subject to South African Law unless the University agrees in writing to the contrary.
>
>
> --
>
> [image: cid:image001.jpg at 01C9F98A.71C74E60]**** <http://www.samoo.es/>
>
> ** ** <http://www.samoo.es/>
>
> *Miguel Carro Pellicer*
>
> *Technical Manager - Director técnico*
>
> miguel.carro at samoo.es****
>
> +34 - 673 80 32 69****
>
> Skype: mcpellicer
>
> www.samoo.es****
>
> ** **
>
> Este  correo  y  sus archivos asociados son privados y confidenciales y va
> dirigido  exclusivamente  a su destinatario. Si recibe este correo sin ser
> el  destinatario del mismo, le rogamos proceda a su eliminación y lo ponga
> en  conocimiento del emisor. La difusión por cualquier medio del contenido
> de  este  correo podría ser sancionada conforme a lo previsto en las leyes
> españolas, Ley Orgánica 15/1999 de Protección de Datos de Carácter
> Personal.  No  se autoriza la utilización con fines comerciales o para su
> incorporación a ficheros automatizados de las direcciones del emisor o del
> destinatario.”****
>
> ** **
>
> This mail and its attached files are confidential and are only and
> exclusively intended to their addressee. In case you may receive this mail
> not being its addressee, we beg you to let us know the error by reply and
> to proceed to destroy it. The circulation by any mean of this mail could be
> penalised in accordance with the Spanish legislation. Is not allowed the
> use of both, the transmitter and the addressee’s, address with a commercial
> aim, or in order to be incorporated to automated data process or to any
> kind of files. ****
>
> ** **
>
> P Antes de imprimir este correo electrónico piense bien si es necesario
> hacerlo. El medioambiente es cosa de todos.****
>
> ** **
>
> ** **
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120720/4dd9d104/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 3022 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120720/4dd9d104/attachment.jpe 


More information about the sakai-dev mailing list