Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By anukasa on
Hi ,
I am new to Drupal and some freelancers developed a website for me .everything was working fine but accidently now a submenu link is not working now. When i click on that, am getting an error "currently unable to handle this request.HTTP ERROR 500" .I really don't have any idea where to fix that from my admin account.that menu is about "events" so I could see those created events in admin->Content. but when i click on the menu its throwing error.Any help will be appreciated!
Thank you.
Comments
=-=
administer -> menus
Without knowing what the menu is linking to (internal or external, if internal to a view, a node?) it's difficult to help
I am sorry .May i Know where
I am sorry .May i Know where to check that.?
=-=
in administer -> menus as already stated in previous comment. if you are unsure what that means, then I'd first suggest you get familiar with the Drupal 7 documentation related to menus @ https://www.drupal.org/docs/7/working-with-menus
Sorry if am confused by
Sorry if am confused by explaining and sorry i am completely new to drupal.I meant I could see my newly created events from my admin account (admin->content ) .But in the website when i click on that particular menu link it is throwing error.it suppose to display those events under that menu. I donno how to check its internal/External error .But if i type that node number in the url i could see that particular event.
HTTP error 500 is a server
HTTP error 500 is a server error. It often means there's an error in the PHP code that generated the page. Are you still in contact with the developer who created your site? You may need his/her help.
They are freelancers .they
They are freelancers .they won't do support.you are correct .its problem with the php code.I could see the error log "PHP Parse error: syntax error, unexpected '[' in ...path/event/event-list/form--event_list.tpl.php on line 48" .I am not sure is that the way to edit that page manually and modify the syntax .?
$form['submit']['#attributes']['class'] = ['tribe-events-button', 'tribe-no-param'];
You may have an older version
You may have an older version of PHP on your server than the version your developers had. The syntax shown I believe is only available in PHP 5.5 and later. If your version of PHP is older, try replacing that line with the following:
For what it's worth, it's
For what it's worth, it's also very poor coding practice to have this kind of code in a .tpl.php file. I suspect your freelance developers were not experienced with Drupal.
That was really helpful.the
That was really helpful.the issue is fixed and the link is working now.
Just wondering those php files are from the theme ? I bought that theme and gave it to freelancers to customize.
Correct, that file is from
Correct, that file is from the theme.
So my freelancer is safe :)
So my freelancer is safe :) .Good to know about the coding standard they suppose to follow.
Thank you so much for your time to helping me out.