PostCalendar icon indicating copy to clipboard operation
PostCalendar copied to clipboard

Cant delete PostCalendar event on ZK 1.4.3

Open MrMontesa opened this issue 7 years ago • 8 comments

I've tried deleting a few test events which is not possible. When clicking the "delete" button on "Delete event" page, I get redirected to the same page with asking again for pressing delete. Using browser back I end up on the page before which is monthly overview. The event is still there. When hitting F5 for refresh I receive the following error message:

Expected value of type "Zikula\CategoriesModule\Entity\CategoryEntity" for association field "Zikula\CategoriesModule\Entity\CategoryAttributeEntity#$category", got "DoctrineProxy\__CG__\Zikula_Doctrine2_Entity_Category" instead.

Also deliting events from admin area does not work as the page to delete events is the same.

Environment: PostCalendar 8.0.3 / ZK: 1.4.3 / PHP 5.6.25

MrMontesa avatar Oct 03 '16 08:10 MrMontesa

That is a Core issue I think. ping @Guite

craigh avatar Oct 03 '16 09:10 craigh

The problem is that Zikula_Doctrine2_Entity_Category is deprecated. Hence Zikula\CategoriesModule\Entity\CategoryAttributeEntity does now use Zikula\CategoriesModule\Entity\CategoryEntity instead. I don't know if this can be solved centrally. The easy fix is changing the super class of PostCalendar_Entity_EventCategory.

But:

https://github.com/zikula/core/blob/1.4/src/lib/legacy/Zikula/Doctrine2/Entity/Category.php#L108 points to Zikula\CategoriesModule\Entity\CategoryAttributeEntity instead of Zikula_Doctrine2_Entity_EntityAttribute. Maybe this is the cause of the problem.

Guite avatar Oct 03 '16 09:10 Guite

Ping. Any idea how to tackle this? Right now I have to ask my cal editors to move all events that should be removed to a certain date. Then I have to remove is via MySQL command. Thanks for your help.

MrMontesa avatar Oct 10 '16 19:10 MrMontesa

Try changing https://github.com/zikula/core/blob/1.4/src/lib/legacy/Zikula/Doctrine2/Entity/Category.php#L108 from Zikula\CategoriesModule\Entity\CategoryAttributeEntity to Zikula_Doctrine2_Entity_EntityAttribute. Afterwards clear /app/cache/.

Guite avatar Oct 10 '16 19:10 Guite

Spits error 500 with following error message: An exception occurred while executing 'SELECT t0.id AS id_1, t0.name AS name_2, t0.value AS value_3 FROM Zikula_Doctrine2_Entity_EntityAttribute t0': SQLSTATE[42S02]: Base table or view not found: 1146 Table '27915m16910_4.Zikula_Doctrine2_Entity_EntityAttribute' doesn't exist

MrMontesa avatar Oct 10 '16 19:10 MrMontesa

I see. Zikula_Doctrine2_Entity_EntityAttribute is abstract (mapped superclass), so no table exists for it.

Guite avatar Oct 11 '16 06:10 Guite

Probably the module must be changed then.

changing the super class of PostCalendar_Entity_EventCategory.

Guite avatar Oct 11 '16 06:10 Guite

Ping. My users are asking why they cant delete events. Moving them to a backdated time is not too good workaround to user acceptance is decreasing. Anything I can help with?

MrMontesa avatar Nov 18 '16 15:11 MrMontesa