Support

Home Forums Seating Chart Add-on (EE3) Section align doesn't save changes

Section align doesn't save changes

Posted: May 26, 2014 at 5:11 pm


Cristi Constantin

May 26, 2014 at 5:11 pm

When editing the properties of a seating chart, there is a dedicated page related to the alignment (left or right)/sorting (from left to right, from right to left) of different sections. If I choose other radio boxes than the default ones, after pressing the Save button the screen refreshes with the default settings, without saving my changes. Meanwhile, PHP logs nothing.


Sidney Harrell

May 27, 2014 at 9:25 am

Are you getting the message on the screen: “Alignment updated”?


Cristi Constantin

May 28, 2014 at 12:35 am

Yes, I do, but the radio boxes remain the same, even if I access the page one more time.
By the way, what does this feature do?


Sidney Harrell

May 28, 2014 at 11:34 am

That means plugins/espresso-seating/template/edit_section_alignment.php line 9 is getting executed. The next question is whether it is executing line 17. Can you go into plugins/espresso-seating/lib/seating_chart.class.php and change line 525 to be:

$result=$wpdb->query($sql);var_dump($result);

Honestly, I’m not sure what this feature does. I’m guessing that it lets you change the output of a chart that you have already uploaded.


Cristi Constantin

May 28, 2014 at 3:14 pm

Interesting enough, I checked the database content, and the saving part works ok: I can see properly updated columns (alignment, sort_order) in *_events_seating_chart_level_section_alignment. So, there must be a reading problem affecting wp-admin part as well as the main site (which displays the seating chart; here I couldn’t see any difference at all).
Please investigate on this side (select).
Thank you.


Cristi Constantin

June 2, 2014 at 11:18 am

Hi, do you have any news on this subject? Thank you.


Sidney Harrell

June 2, 2014 at 3:11 pm

Looks like it ends up as an inline style on a div. Look at plugins/espresso-seating/request.php lin 91.


Cristi Constantin

June 2, 2014 at 3:23 pm

I have seen that, but it is not working because the select part doesn’t properly read and manage the latest database value.


Sidney Harrell

June 2, 2014 at 3:30 pm

I think I see what may be the problem. There is a transient set with a life of 15 days. It is supposed to be deleted when the section alignment is updated. Try commenting out line 481 of lib/class/seating_chart.class.php:

$transient = seating_chart::get_section_alignment_transient($seating_chart_id, $level, $section);


Cristi Constantin

June 2, 2014 at 3:36 pm

I am sorry if I seem impolite, but I am your customer, not your tester. If you need, I can provide you with sample xls files as seating chart examples to play with.
Thank you.


Cristi Constantin

June 4, 2014 at 6:12 am

I checked into further detail, I don’t understand where it fails, but I don’t want to totally skip the transient feature, which is a performance improvement.
From what I see:
1. when someone saves the alignment, save_section_alignment() is called, which, at the last line, deletes the transient:

$transient = seating_chart::get_section_alignment_transient($seating_chart_id, $level, $section);
delete_transient($transient);

2. afterwards, when loading the seating chart, get_section_alignment() is called, which tries to read the transient or otherwise reconstruct its data; here, if the delete was ok and on the same transient, it should go and read the latest info from the database:

$transient = seating_chart::get_section_alignment_transient($seating_chart_id, $level, $section);
if (FALSE === ($row = get_transient($transient))) {
$sql = $wpdb->prepare(“select alignment, sort_order…………….


Sidney Harrell

June 9, 2014 at 5:35 pm

It should work with the transients in theory, but there could be a bug involved that is keeping it from working. I would try it with the transients disabled, as a troubleshooting measure.
I set up a test site here and it seems to be working ok. I switched the alignment in the admin from left to right, and could see the float on #ee_s_section_a change from left to right.
If you can see it changing in the database table, but it is not outputting the correct float, then it has to be in between where it reads it out of the DB and where it adds it to the inline style.

The support post ‘Section align doesn't save changes’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso